Change in osmo-bsc[master]: stats: Add granularity to chan:rf_fail stat.

2021-01-30 Thread iedemam
iedemam has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/22518 )

Change subject: stats: Add granularity to chan:rf_fail stat.
..


Patch Set 1:

(1 comment)

Thanks for the reviews. I will resolve the issue raised in a subsequent patch 
if that's OK. I know there are more instances with the same problem and can 
knock them all out at once.

https://gerrit.osmocom.org/c/osmo-bsc/+/22518/1/src/osmo-bsc/abis_rsl.c
File src/osmo-bsc/abis_rsl.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/22518/1/src/osmo-bsc/abis_rsl.c@991
PS1, Line 991: lchan->ts->trx->bts->bts_ctrs->ctr
> that long chain of pointer de-references was "OK" if we used it only once. […]
Good point. I've done the same in other locations with my previous stats patch.

If it's ok with you, I'll submit a new patch after this is accepted which 
changes all of those instances as well as this one to use a temporary variable 
in lieu of the huge chain of dereferences.



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I91fe6659fe9df33763f4070b4f505561b2005d38
Gerrit-Change-Number: 22518
Gerrit-PatchSet: 1
Gerrit-Owner: iedemam 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Sat, 30 Jan 2021 08:42:35 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: fr + gbproxy: Start to use AF_PACKET ENOBUFS work-around

2021-01-30 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22545 )


Change subject: fr + gbproxy: Start to use AF_PACKET ENOBUFS work-around
..

fr + gbproxy: Start to use AF_PACKET ENOBUFS work-around

If send() on AF_PACKET returns ENOBUFS, usleep for 2ms and re-try
until it succeeds.

Change-Id: Id7bdd2c690eae3bec1df7634944cd73f0bf0b29a
Closes: OS#5343
---
M deps/Makefile
M fr-net/FRNET_Tests.default
M fr/FR_Tests.default
M gbproxy/GBProxy_Tests.default
4 files changed, 4 insertions(+), 1 deletion(-)



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

diff --git a/deps/Makefile b/deps/Makefile
index 1f2560b..0a5d86c 100644
--- a/deps/Makefile
+++ b/deps/Makefile
@@ -112,7 +112,7 @@
 titan.ProtocolModules.SUA_commit=  R.5.A-5-gcf1137a
 titan.ProtocolModules.TCP_commit=  R.3.A-5-g39e5f45
 titan.ProtocolModules.UDP_commit=  R.4.A-5-geea8aa3
-titan.TestPorts.AF_PACKET_commit=  0.1-1-gcd69809
+titan.TestPorts.AF_PACKET_commit=  0.1-2-g90ef318
 titan.TestPorts.Common_Components.Socket-API_commit=   R.6.A-6-gf4380d0
 titan.TestPorts.Common_Components.Abstract_Socket_commit=  R.9.B-4-gbd41994
 titan.TestPorts.HTTPmsg_commit=R.9.B-4-g9a0dfde
diff --git a/fr-net/FRNET_Tests.default b/fr-net/FRNET_Tests.default
index 2fb8c90..d694d98 100644
--- a/fr-net/FRNET_Tests.default
+++ b/fr-net/FRNET_Tests.default
@@ -9,6 +9,7 @@
 [MODULE_PARAMETERS]

 [TESTPORT_PARAMETERS]
+*.FR.sleep_on_enobufs := "2000" # 2ms

 [MAIN_CONTROLLER]

diff --git a/fr/FR_Tests.default b/fr/FR_Tests.default
index 2fb8c90..d7afd31 100644
--- a/fr/FR_Tests.default
+++ b/fr/FR_Tests.default
@@ -9,6 +9,7 @@
 [MODULE_PARAMETERS]

 [TESTPORT_PARAMETERS]
+*.FR.sleep_on_enobufs := "2000"

 [MAIN_CONTROLLER]

diff --git a/gbproxy/GBProxy_Tests.default b/gbproxy/GBProxy_Tests.default
index 8634b49..b0f28f5 100644
--- a/gbproxy/GBProxy_Tests.default
+++ b/gbproxy/GBProxy_Tests.default
@@ -21,6 +21,7 @@
 *.GBPVTY.CTRL_CLIENT_CLEANUP_LINEFEED := "yes"
 *.GBPVTY.CTRL_DETECT_CONNECTION_ESTABLISHMENT_RESULT := "yes"
 *.GBPVTY.PROMPT1 := "OsmoGbProxy> "
+*.FR.sleep_on_enobufs := "2000" # 2ms


 [MODULE_PARAMETERS]

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


Change in osmo-pcu[master]: contrib/osmo-pcu.spec.in: add missing libosmoctrl dependency

2021-01-30 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/22546 )


Change subject: contrib/osmo-pcu.spec.in: add missing libosmoctrl dependency
..

contrib/osmo-pcu.spec.in: add missing libosmoctrl dependency

Change-Id: I37c478f3f430f72620af17f1c3329f6ee8515402
Fixes: Id35f40d05f3e081f32fddbf1fa34cb338db452ca
---
M contrib/osmo-pcu.spec.in
1 file changed, 1 insertion(+), 0 deletions(-)



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

diff --git a/contrib/osmo-pcu.spec.in b/contrib/osmo-pcu.spec.in
index e197cb7..3cbc238 100644
--- a/contrib/osmo-pcu.spec.in
+++ b/contrib/osmo-pcu.spec.in
@@ -32,6 +32,7 @@
 BuildRequires:  pkgconfig(libosmogb) >= 1.1.0
 BuildRequires:  pkgconfig(libosmogsm) >= 1.1.0
 BuildRequires:  pkgconfig(libosmovty) >= 1.1.0
+BuildRequires:  pkgconfig(libosmoctrl) >= 1.2.0
 %{?systemd_requires}

 %description

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I37c478f3f430f72620af17f1c3329f6ee8515402
Gerrit-Change-Number: 22546
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


Change in osmo-ttcn3-hacks[master]: library/Osmocom_VTY_Functions: cosmetic: coding style changes

2021-01-30 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22547 )


Change subject: library/Osmocom_VTY_Functions: cosmetic: coding style changes
..

library/Osmocom_VTY_Functions: cosmetic: coding style changes

Change-Id: Idccdf6fcbda2d020d2263ea1440ea1c5d9ea0e45
---
M library/Osmocom_VTY_Functions.ttcn
1 file changed, 27 insertions(+), 26 deletions(-)



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

diff --git a/library/Osmocom_VTY_Functions.ttcn 
b/library/Osmocom_VTY_Functions.ttcn
index b291b03..a9f4c24 100644
--- a/library/Osmocom_VTY_Functions.ttcn
+++ b/library/Osmocom_VTY_Functions.ttcn
@@ -56,39 +56,40 @@
}

/* wait for any of the permitted prompts; buffer + return all 
intermediate output */
-   function f_vty_wait_for_prompt(TELNETasp_PT pt, boolean strict := true, 
charstring log_label := "(?)") return charstring {
+   function f_vty_wait_for_prompt(TELNETasp_PT pt, boolean strict := true, 
charstring log_label := "(?)")
+   return charstring {
var charstring rx, buf := "";
var integer fd;
timer T := 2.0;

T.start;
alt {
-   [] pt.receive(pattern "[\w-]+" & VTY_VIEW_SUFFIX) { };
-   [] pt.receive(pattern "[\w-]+\# ") { };
-   [] pt.receive(pattern "[\w-]+\(*\)\# ") { };
-   [] pt.receive(t_vty_unknown) -> value rx {
-   if (strict) {
-   setverdict(fail, "VTY: Unknown Command: 
" & log_label);
-   mtc.stop;
-   } else {
-   log("VTY: Unknown Command (ignored): " 
& log_label);
-   buf := buf & rx;
-   repeat;
-   }
-   };
-   [] pt.receive(charstring:?) -> value rx { buf := buf & 
rx; repeat };
-   [] pt.receive(integer:?) -> value fd {
-   if (fd == -1) {
-   setverdict(fail, "VTY Telnet Connection 
Failure: " & log_label);
-   mtc.stop;
-   } else {
-   repeat; /* telnet connection succeeded 
*/
-   }
-   }
-   [] T.timeout {
-   setverdict(fail, "VTY Timeout for prompt: " & 
log_label);
+   [] pt.receive(pattern "[\w-]+" & VTY_VIEW_SUFFIX) { };
+   [] pt.receive(pattern "[\w-]+\# ") { };
+   [] pt.receive(pattern "[\w-]+\(*\)\# ") { };
+   [] pt.receive(t_vty_unknown) -> value rx {
+   if (strict) {
+   setverdict(fail, "VTY: Unknown Command: " & 
log_label);
mtc.stop;
-   };
+   } else {
+   log("VTY: Unknown Command (ignored): " & 
log_label);
+   buf := buf & rx;
+   repeat;
+   }
+   };
+   [] pt.receive(charstring:?) -> value rx { buf := buf & rx; 
repeat };
+   [] pt.receive(integer:?) -> value fd {
+   if (fd == -1) {
+   setverdict(fail, "VTY Telnet Connection 
Failure: " & log_label);
+   mtc.stop;
+   } else {
+   repeat; /* telnet connection succeeded */
+   }
+   }
+   [] T.timeout {
+   setverdict(fail, "VTY Timeout for prompt: " & 
log_label);
+   mtc.stop;
+   };
}
T.stop;
return buf;

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


Change in osmo-ttcn3-hacks[master]: hlr/HLR_Tests.default: increase the VTY prompt timeout

2021-01-30 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22549 )


Change subject: hlr/HLR_Tests.default: increase the VTY prompt timeout
..

hlr/HLR_Tests.default: increase the VTY prompt timeout

The subscriber management commands in osmo-hlr may take a while to
complete, because it needs to update the SQLite database.  Let's
increase the timeout, so the test suite would not fail due to the
IUT taking longer than 2 seconds to create a subscriber.

Change-Id: I5835d5f8fa8915182623b59b23b5a23816950e4f
---
M hlr/HLR_Tests.default
1 file changed, 1 insertion(+), 0 deletions(-)



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

diff --git a/hlr/HLR_Tests.default b/hlr/HLR_Tests.default
index 2e9aac6..36dbbc1 100644
--- a/hlr/HLR_Tests.default
+++ b/hlr/HLR_Tests.default
@@ -19,5 +19,6 @@

 [MODULE_PARAMETERS]
 Osmocom_VTY_Functions.mp_prompt_prefix := "OsmoHLR";
+Osmocom_VTY_Functions.mp_prompt_timeout := 6.0;

 [EXECUTE]

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


Change in osmo-ttcn3-hacks[master]: library/Osmocom_VTY_Functions: make VTY prompt timeout configurable

2021-01-30 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22548 )


Change subject: library/Osmocom_VTY_Functions: make VTY prompt timeout 
configurable
..

library/Osmocom_VTY_Functions: make VTY prompt timeout configurable

Change-Id: Iadec95446b98d9767d08a841fa1c28f8c71c5eea
---
M library/Osmocom_VTY_Functions.ttcn
1 file changed, 3 insertions(+), 2 deletions(-)



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

diff --git a/library/Osmocom_VTY_Functions.ttcn 
b/library/Osmocom_VTY_Functions.ttcn
index a9f4c24..9410c9e 100644
--- a/library/Osmocom_VTY_Functions.ttcn
+++ b/library/Osmocom_VTY_Functions.ttcn
@@ -15,6 +15,7 @@

modulepar {
charstring mp_prompt_prefix := "OpenBSC";
+   float mp_prompt_timeout := 2.0;
}

const charstring VTY_VIEW_SUFFIX := "> ";
@@ -60,9 +61,9 @@
return charstring {
var charstring rx, buf := "";
var integer fd;
-   timer T := 2.0;
+   timer T;

-   T.start;
+   T.start(mp_prompt_timeout);
alt {
[] pt.receive(pattern "[\w-]+" & VTY_VIEW_SUFFIX) { };
[] pt.receive(pattern "[\w-]+\# ") { };

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


Change in osmo-ttcn3-hacks[master]: library/Osmocom_VTY_Functions: cosmetic: coding style changes

2021-01-30 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22547 )

Change subject: library/Osmocom_VTY_Functions: cosmetic: coding style changes
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22547
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: Idccdf6fcbda2d020d2263ea1440ea1c5d9ea0e45
Gerrit-Change-Number: 22547
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Sat, 30 Jan 2021 14:06:55 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: library/Osmocom_VTY_Functions: make VTY prompt timeout configurable

2021-01-30 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22548 )

Change subject: library/Osmocom_VTY_Functions: make VTY prompt timeout 
configurable
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22548
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: Iadec95446b98d9767d08a841fa1c28f8c71c5eea
Gerrit-Change-Number: 22548
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Sat, 30 Jan 2021 14:07:05 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: hlr/HLR_Tests.default: increase the VTY prompt timeout

2021-01-30 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22549 )

Change subject: hlr/HLR_Tests.default: increase the VTY prompt timeout
..


Patch Set 1: Code-Review+1

really, it takes more than 2s for the VTY to respond to a subscriber command? 
That seems a bit long to me.  But if you have seen that this fixes it...


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22549
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: I5835d5f8fa8915182623b59b23b5a23816950e4f
Gerrit-Change-Number: 22549
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Sat, 30 Jan 2021 14:07:37 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: library/Osmocom_VTY_Functions: cosmetic: coding style changes

2021-01-30 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22547 )

Change subject: library/Osmocom_VTY_Functions: cosmetic: coding style changes
..

library/Osmocom_VTY_Functions: cosmetic: coding style changes

Change-Id: Idccdf6fcbda2d020d2263ea1440ea1c5d9ea0e45
---
M library/Osmocom_VTY_Functions.ttcn
1 file changed, 27 insertions(+), 26 deletions(-)

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



diff --git a/library/Osmocom_VTY_Functions.ttcn 
b/library/Osmocom_VTY_Functions.ttcn
index b291b03..a9f4c24 100644
--- a/library/Osmocom_VTY_Functions.ttcn
+++ b/library/Osmocom_VTY_Functions.ttcn
@@ -56,39 +56,40 @@
}

/* wait for any of the permitted prompts; buffer + return all 
intermediate output */
-   function f_vty_wait_for_prompt(TELNETasp_PT pt, boolean strict := true, 
charstring log_label := "(?)") return charstring {
+   function f_vty_wait_for_prompt(TELNETasp_PT pt, boolean strict := true, 
charstring log_label := "(?)")
+   return charstring {
var charstring rx, buf := "";
var integer fd;
timer T := 2.0;

T.start;
alt {
-   [] pt.receive(pattern "[\w-]+" & VTY_VIEW_SUFFIX) { };
-   [] pt.receive(pattern "[\w-]+\# ") { };
-   [] pt.receive(pattern "[\w-]+\(*\)\# ") { };
-   [] pt.receive(t_vty_unknown) -> value rx {
-   if (strict) {
-   setverdict(fail, "VTY: Unknown Command: 
" & log_label);
-   mtc.stop;
-   } else {
-   log("VTY: Unknown Command (ignored): " 
& log_label);
-   buf := buf & rx;
-   repeat;
-   }
-   };
-   [] pt.receive(charstring:?) -> value rx { buf := buf & 
rx; repeat };
-   [] pt.receive(integer:?) -> value fd {
-   if (fd == -1) {
-   setverdict(fail, "VTY Telnet Connection 
Failure: " & log_label);
-   mtc.stop;
-   } else {
-   repeat; /* telnet connection succeeded 
*/
-   }
-   }
-   [] T.timeout {
-   setverdict(fail, "VTY Timeout for prompt: " & 
log_label);
+   [] pt.receive(pattern "[\w-]+" & VTY_VIEW_SUFFIX) { };
+   [] pt.receive(pattern "[\w-]+\# ") { };
+   [] pt.receive(pattern "[\w-]+\(*\)\# ") { };
+   [] pt.receive(t_vty_unknown) -> value rx {
+   if (strict) {
+   setverdict(fail, "VTY: Unknown Command: " & 
log_label);
mtc.stop;
-   };
+   } else {
+   log("VTY: Unknown Command (ignored): " & 
log_label);
+   buf := buf & rx;
+   repeat;
+   }
+   };
+   [] pt.receive(charstring:?) -> value rx { buf := buf & rx; 
repeat };
+   [] pt.receive(integer:?) -> value fd {
+   if (fd == -1) {
+   setverdict(fail, "VTY Telnet Connection 
Failure: " & log_label);
+   mtc.stop;
+   } else {
+   repeat; /* telnet connection succeeded */
+   }
+   }
+   [] T.timeout {
+   setverdict(fail, "VTY Timeout for prompt: " & 
log_label);
+   mtc.stop;
+   };
}
T.stop;
return buf;

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


Change in osmo-ttcn3-hacks[master]: library/Osmocom_VTY_Functions: make VTY prompt timeout configurable

2021-01-30 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22548 )

Change subject: library/Osmocom_VTY_Functions: make VTY prompt timeout 
configurable
..

library/Osmocom_VTY_Functions: make VTY prompt timeout configurable

Change-Id: Iadec95446b98d9767d08a841fa1c28f8c71c5eea
---
M library/Osmocom_VTY_Functions.ttcn
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/library/Osmocom_VTY_Functions.ttcn 
b/library/Osmocom_VTY_Functions.ttcn
index a9f4c24..9410c9e 100644
--- a/library/Osmocom_VTY_Functions.ttcn
+++ b/library/Osmocom_VTY_Functions.ttcn
@@ -15,6 +15,7 @@

modulepar {
charstring mp_prompt_prefix := "OpenBSC";
+   float mp_prompt_timeout := 2.0;
}

const charstring VTY_VIEW_SUFFIX := "> ";
@@ -60,9 +61,9 @@
return charstring {
var charstring rx, buf := "";
var integer fd;
-   timer T := 2.0;
+   timer T;

-   T.start;
+   T.start(mp_prompt_timeout);
alt {
[] pt.receive(pattern "[\w-]+" & VTY_VIEW_SUFFIX) { };
[] pt.receive(pattern "[\w-]+\# ") { };

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


Change in osmo-ttcn3-hacks[master]: fr + gbproxy: Start to use AF_PACKET ENOBUFS work-around

2021-01-30 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22545 )

Change subject: fr + gbproxy: Start to use AF_PACKET ENOBUFS work-around
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22545
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: Id7bdd2c690eae3bec1df7634944cd73f0bf0b29a
Gerrit-Change-Number: 22545
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Sat, 30 Jan 2021 14:08:15 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: fr + gbproxy: Start to use AF_PACKET ENOBUFS work-around

2021-01-30 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22545 )

Change subject: fr + gbproxy: Start to use AF_PACKET ENOBUFS work-around
..

fr + gbproxy: Start to use AF_PACKET ENOBUFS work-around

If send() on AF_PACKET returns ENOBUFS, usleep for 2ms and re-try
until it succeeds.

Change-Id: Id7bdd2c690eae3bec1df7634944cd73f0bf0b29a
Closes: OS#5343
---
M deps/Makefile
M fr-net/FRNET_Tests.default
M fr/FR_Tests.default
M gbproxy/GBProxy_Tests.default
4 files changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/deps/Makefile b/deps/Makefile
index 1f2560b..0a5d86c 100644
--- a/deps/Makefile
+++ b/deps/Makefile
@@ -112,7 +112,7 @@
 titan.ProtocolModules.SUA_commit=  R.5.A-5-gcf1137a
 titan.ProtocolModules.TCP_commit=  R.3.A-5-g39e5f45
 titan.ProtocolModules.UDP_commit=  R.4.A-5-geea8aa3
-titan.TestPorts.AF_PACKET_commit=  0.1-1-gcd69809
+titan.TestPorts.AF_PACKET_commit=  0.1-2-g90ef318
 titan.TestPorts.Common_Components.Socket-API_commit=   R.6.A-6-gf4380d0
 titan.TestPorts.Common_Components.Abstract_Socket_commit=  R.9.B-4-gbd41994
 titan.TestPorts.HTTPmsg_commit=R.9.B-4-g9a0dfde
diff --git a/fr-net/FRNET_Tests.default b/fr-net/FRNET_Tests.default
index 2fb8c90..d694d98 100644
--- a/fr-net/FRNET_Tests.default
+++ b/fr-net/FRNET_Tests.default
@@ -9,6 +9,7 @@
 [MODULE_PARAMETERS]

 [TESTPORT_PARAMETERS]
+*.FR.sleep_on_enobufs := "2000" # 2ms

 [MAIN_CONTROLLER]

diff --git a/fr/FR_Tests.default b/fr/FR_Tests.default
index 2fb8c90..d7afd31 100644
--- a/fr/FR_Tests.default
+++ b/fr/FR_Tests.default
@@ -9,6 +9,7 @@
 [MODULE_PARAMETERS]

 [TESTPORT_PARAMETERS]
+*.FR.sleep_on_enobufs := "2000"

 [MAIN_CONTROLLER]

diff --git a/gbproxy/GBProxy_Tests.default b/gbproxy/GBProxy_Tests.default
index 8634b49..b0f28f5 100644
--- a/gbproxy/GBProxy_Tests.default
+++ b/gbproxy/GBProxy_Tests.default
@@ -21,6 +21,7 @@
 *.GBPVTY.CTRL_CLIENT_CLEANUP_LINEFEED := "yes"
 *.GBPVTY.CTRL_DETECT_CONNECTION_ESTABLISHMENT_RESULT := "yes"
 *.GBPVTY.PROMPT1 := "OsmoGbProxy> "
+*.FR.sleep_on_enobufs := "2000" # 2ms


 [MODULE_PARAMETERS]

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


Change in osmo-bts[master]: pcu_sock: send SI1, SI3 and SI3 via PCUIF

2021-01-30 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/22541 )

Change subject: pcu_sock: send SI1, SI3 and SI3 via PCUIF
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ib7aeb41e634ad6fcab3766a4667b0267c749436a
Gerrit-Change-Number: 22541
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Sat, 30 Jan 2021 14:09:43 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: BTS_Tests: test forwarding of SI1, SI3 and SI13 via PCUIF

2021-01-30 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22540 )

Change subject: BTS_Tests: test forwarding of SI1, SI3 and SI13 via PCUIF
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22540
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: I5138ab183793e7eee4dc494318d984e9f1f56932
Gerrit-Change-Number: 22540
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Sat, 30 Jan 2021 14:10:29 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-pcu[master]: gprs_bssgp_rim: add serving BSS NACC application

2021-01-30 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/22368 )

Change subject: gprs_bssgp_rim: add serving BSS NACC application
..


Patch Set 6: Code-Review+1


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Id72118120c14984d2fb1b918b41fac4868150d41
Gerrit-Change-Number: 22368
Gerrit-PatchSet: 6
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Sat, 30 Jan 2021 14:11:57 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-pcu[master]: contrib/osmo-pcu.spec.in: add missing libosmoctrl dependency

2021-01-30 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/22546 )

Change subject: contrib/osmo-pcu.spec.in: add missing libosmoctrl dependency
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/c/osmo-pcu/+/22546/1/contrib/osmo-pcu.spec.in
File contrib/osmo-pcu.spec.in:

https://gerrit.osmocom.org/c/osmo-pcu/+/22546/1/contrib/osmo-pcu.spec.in@35
PS1, Line 35: Bui
configure.ac requires 1.4.0, os best to use the same version here.

Also (unrelated to this patch) theo other versions all also require 1.4.0 now



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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I37c478f3f430f72620af17f1c3329f6ee8515402
Gerrit-Change-Number: 22546
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Sat, 30 Jan 2021 14:13:30 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-pcu[master]: tests/rlcmac: add more test vectors for Packet Resource Request

2021-01-30 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/22523 )

Change subject: tests/rlcmac: add more test vectors for Packet Resource Request
..

tests/rlcmac: add more test vectors for Packet Resource Request

All vectors should be valid, since they were generated by an MS.
As can be seen, osmo-pcu fails to decode one of the vectors.

Change-Id: I37a2ddd394eeffa1cae0f3e4190200a57fcf
OS#4955

Change-Id: Ib5677048f5668185ffe752f97c97d5612eee4d72
---
M tests/rlcmac/RLCMACTest.cpp
M tests/rlcmac/RLCMACTest.err
M tests/rlcmac/RLCMACTest.ok
3 files changed, 47 insertions(+), 0 deletions(-)

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



diff --git a/tests/rlcmac/RLCMACTest.cpp b/tests/rlcmac/RLCMACTest.cpp
index c6ad192..598d11a 100644
--- a/tests/rlcmac/RLCMACTest.cpp
+++ b/tests/rlcmac/RLCMACTest.cpp
@@ -159,6 +159,12 @@
"401673c87f24af2632b2596420060091000b780080", // Packet Resource 
Request (from keith)
"40200ffc0021ec010b2b2b2b2b2b2b2b2b2b2b2b2b2b2b", // EPDAN
"400a9020003010012a0800132b2b2b2b2b", // Packet Downlink 
Ack/Nack ?
+
+   /* Packet Resource Request (see OS#4955, mistakes in 3GPP TS 44.060) */
+   "4117ea1b903eaeb2686564b2330820078000102b2b2b2b",
+   "40167e49f7f8ef2632b259662006806d00541c0080",
+   "4017787174d92eba686564b2ccc30800a40b2b2b2b",
+   "4017e5b2cd5a2eca68655e44aec84880139300412b2b2b",
};

int testDataSize = sizeof(testData)/sizeof(testData[0]);
diff --git a/tests/rlcmac/RLCMACTest.err b/tests/rlcmac/RLCMACTest.err
index 6007289..fc2889f 100644
--- a/tests/rlcmac/RLCMACTest.err
+++ b/tests/rlcmac/RLCMACTest.err
@@ -33,6 +33,15 @@
 DCSN1 INFO csnStreamEncoder (type: EGPRS Pkt DL ACK/NACK (8)): PayloadType = 1 
| spare = 0 | R = 0 | MESSAGE_TYPE = 8 | DOWNLINK_TFI = 0 | MS_OUT_OF_MEMORY = 
0 | Exist_EGPRS_ChannelQualityReport = 1 |  : EGPRS_ChannelQualityReport |  : 
EGPRS_BEP_LinkQualityMeasurements | Exist_MEAN_CV_BEP_GMSK = 1 | MEAN_BEP_GMSK 
= 31 | CV_BEP_GMSK = 7 | Exist_MEAN_CV_BEP_8PSK = 0 |  : End 
EGPRS_BEP_LinkQualityMeasurements | C_VALUE = 0 |  : 
EGPRS_TimeslotLinkQualityMeasurements | Exist_BEP_MEASUREMENTS = 0 | 
Exist_INTERFERENCE_MEASUREMENTS = 0 |  : End 
EGPRS_TimeslotLinkQualityMeasurements |  : End EGPRS_ChannelQualityReport | 
Exist_ChannelRequestDescription = 0 | Exist_PFI = 0 | Exist_ExtensionBits = 0 | 
 : EGPRS_AckNack | Desc = 1 |  : Desc | FINAL_ACK_INDICATION = 0 | 
BEGINNING_OF_WINDOW = 1 | END_OF_WINDOW = 1 | STARTING_SEQUENCE_NUMBER = 2 | 
Exist_CRBB = 0 | Desc length = 15 |  : End Desc |  : End EGPRS_AckNack | 
Padding = 11|43|43|43|43|43|43|43|43|43|43|43|43|43|43|
 DCSN1 INFO csnStreamDecoder (type: Pkt DL ACK/NACK (2)): PayloadType = 1 | 
spare = 0 | R = 0 | MESSAGE_TYPE = 2 | DOWNLINK_TFI = 20 |  : 
Ack_Nack_Description | FINAL_ACK_INDICATION = 1 | STARTING_SEQUENCE_NUMBER = 1 
| RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | 
RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | 
RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | 
RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End 
Ack_Nack_Description | Exist_Channel_Request_Description = 1 |  : 
Channel_Request_Description | PEAK_THROUGHPUT_CLASS = 0 | RADIO_PRIORITY = 0 | 
RLC_MODE = 0 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 18 | : End 
Channel_Request_Description |  : Channel_Quality_Report | C_VALUE = 40 | RXQUAL 
= 1 | SIGN_VAR = 0 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 
| Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 
| Slot[7].Exist = 0 | : End Channel_Quality_Report | Exist_AdditionsR99 = 1 |  
: AdditionsR99 | Exist_PFI = 0 | : End AdditionsR99 | Padding = 
3|43|43|43|43|43|
 DCSN1 INFO csnStreamEncoder (type: Pkt DL ACK/NACK (2)): PayloadType = 1 | 
spare = 0 | R = 0 | MESSAGE_TYPE = 2 | DOWNLINK_TFI = 20 |  : 
Ack_Nack_Description | FINAL_ACK_INDICATION = 1 | STARTING_SEQUENCE_NUMBER = 1 
| RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | 
RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | 
RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | 
RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 |  : End 
Ack_Nack_Description | Exist_Channel_Request_Description = 1 |  : 
Channel_Request_Description | PEAK_THROUGHPUT_CLASS = 0 | RADIO_PRIORITY = 0 | 
RLC_MODE = 0 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 18 |  : End 
Channel_Request_Description |  : Channel_Quality_Report | C_VALUE = 40 | RXQUAL 
= 1 | SIGN_VAR = 0 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 
| Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 
| Slot[7].Exist = 0 |  : End Channel_Quality_Report | Exist_AdditionsR99 = 1 |  
: AdditionsR99 | Exist_PFI = 0 |  : End AdditionsR99 | Padding = 
3|43|43|43|43|43|
+DCSN1 INFO csnStreamDe

Change in osmo-bsc[master]: stats: Add granularity to chan:rf_fail stat.

2021-01-30 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/22518 )

Change subject: stats: Add granularity to chan:rf_fail stat.
..


Patch Set 1: Code-Review+2

(1 comment)

https://gerrit.osmocom.org/c/osmo-bsc/+/22518/1/src/osmo-bsc/abis_rsl.c
File src/osmo-bsc/abis_rsl.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/22518/1/src/osmo-bsc/abis_rsl.c@991
PS1, Line 991: lchan->ts->trx->bts->bts_ctrs->ctr
> Good point. I've done the same in other locations with my previous stats 
> patch. […]
agreed.



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I91fe6659fe9df33763f4070b4f505561b2005d38
Gerrit-Change-Number: 22518
Gerrit-PatchSet: 1
Gerrit-Owner: iedemam 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Sat, 30 Jan 2021 14:15:14 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: iedemam 
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment


Change in osmo-bsc[master]: stats: Add granularity to chan:rf_fail stat.

2021-01-30 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/22518 )

Change subject: stats: Add granularity to chan:rf_fail stat.
..

stats: Add granularity to chan:rf_fail stat.

Add additional counters to track TCH and SDCCH RF failures in separate 
subcategories.

Change-Id: I91fe6659fe9df33763f4070b4f505561b2005d38
---
M include/osmocom/bsc/bts.h
M src/osmo-bsc/abis_rsl.c
M src/osmo-bsc/bts.c
3 files changed, 19 insertions(+), 0 deletions(-)

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



diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index 8f3e05b..b81f45f 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -28,6 +28,8 @@
BTS_CTR_CHREQ_SUCCESSFUL,
BTS_CTR_CHREQ_NO_CHANNEL,
BTS_CTR_CHAN_RF_FAIL,
+   BTS_CTR_CHAN_RF_FAIL_TCH,
+   BTS_CTR_CHAN_RF_FAIL_SDCCH,
BTS_CTR_CHAN_RLL_ERR,
BTS_CTR_BTS_OML_FAIL,
BTS_CTR_BTS_RSL_FAIL,
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index 388e2fc..9e00fe7 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -982,6 +982,17 @@
LOG_LCHAN(lchan, LOGL_ERROR, "CONNECTION FAIL%s\n", 
rsl_cause_name(&tp));

rate_ctr_inc(&lchan->ts->trx->bts->bts_ctrs->ctr[BTS_CTR_CHAN_RF_FAIL]);
+   switch (lchan->type) {
+   case GSM_LCHAN_SDCCH:
+   
rate_ctr_inc(&lchan->ts->trx->bts->bts_ctrs->ctr[BTS_CTR_CHAN_RF_FAIL_SDCCH]);
+   break;
+   case GSM_LCHAN_TCH_H:
+   case GSM_LCHAN_TCH_F:
+   
rate_ctr_inc(&lchan->ts->trx->bts->bts_ctrs->ctr[BTS_CTR_CHAN_RF_FAIL_TCH]);
+   break;
+   default:
+   break;
+   }

/* If the lchan is associated with a conn, we shall notify the MSC of 
the RSL Conn Failure, and
 * the connection will presumably be torn down and lead to an lchan 
release. During initial
diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c
index 3fa4f24..ac0e2af 100644
--- a/src/osmo-bsc/bts.c
+++ b/src/osmo-bsc/bts.c
@@ -791,6 +791,12 @@
[BTS_CTR_CHAN_RF_FAIL] = \
{ "chan:rf_fail",
  "Received a RF failure indication from BTS" },
+   [BTS_CTR_CHAN_RF_FAIL_TCH] = \
+   { "chan:rf_fail_tch",
+ "Received a RF failure indication from BTS on a TCH channel" 
},
+   [BTS_CTR_CHAN_RF_FAIL_SDCCH] = \
+   { "chan:rf_fail_sdcch",
+ "Received a RF failure indication from BTS on an SDCCH 
channel" },
[BTS_CTR_CHAN_RLL_ERR] = \
{ "chan:rll_err",
  "Received a RLL failure with T200 cause from BTS" },

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I91fe6659fe9df33763f4070b4f505561b2005d38
Gerrit-Change-Number: 22518
Gerrit-PatchSet: 2
Gerrit-Owner: iedemam 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in libosmocore[master]: gsm_7bit_encode_n(): test encoding of more than 250 septets

2021-01-30 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/22542 )

Change subject: gsm_7bit_encode_n(): test encoding of more than 250 septets
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I723300578d5ab0c7b94cf49c14d962b2dbf47740
Gerrit-Change-Number: 22542
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Sat, 30 Jan 2021 14:15:46 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: gsm_7bit_encode_n(): use regular malloc() instead of calloc()

2021-01-30 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/22543 )

Change subject: gsm_7bit_encode_n(): use regular malloc() instead of calloc()
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I6956cbd83b2999dbcf8e2d210134b0a166c33efb
Gerrit-Change-Number: 22543
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Sat, 30 Jan 2021 14:16:24 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: gsm_7bit_encode_n(): fix integer overflow in gsm_septets2octets()

2021-01-30 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/22544 )

Change subject: gsm_7bit_encode_n(): fix integer overflow in 
gsm_septets2octets()
..


Patch Set 1: Code-Review-1

I don't think you can do that without breaking the ABI. So it's best to 
introduce a new function [name] for the changed  function signature.  Otherwise 
we risk breaking running old applications against new library.


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ib1aac538afeb0a5c76a1df472d555139a496e12e
Gerrit-Change-Number: 22544
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Sat, 30 Jan 2021 14:17:27 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-sgsn[master]: gbproxy: Send BVC-BLOCK for PTP BVC to SGSN when BSS resets BVCI=0

2021-01-30 Thread laforge
laforge has abandoned this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/21476 )

Change subject: gbproxy: Send BVC-BLOCK for PTP BVC to SGSN when BSS resets 
BVCI=0
..


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I48f1c148bc5c7c9a49b789dac78f76c2aa7baff8
Gerrit-Change-Number: 21476
Gerrit-PatchSet: 4
Gerrit-Owner: laforge 
Gerrit-Assignee: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-CC: daniel 
Gerrit-MessageType: abandon


Change in osmo-pcu[master]: contrib/osmo-pcu.spec.in: add missing libosmoctrl dependency

2021-01-30 Thread fixeria
Hello Jenkins Builder, laforge, pespin,

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

https://gerrit.osmocom.org/c/osmo-pcu/+/22546

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

Change subject: contrib/osmo-pcu.spec.in: add missing libosmoctrl dependency
..

contrib/osmo-pcu.spec.in: add missing libosmoctrl dependency

Change-Id: I37c478f3f430f72620af17f1c3329f6ee8515402
Fixes: Id35f40d05f3e081f32fddbf1fa34cb338db452ca
---
M contrib/osmo-pcu.spec.in
1 file changed, 1 insertion(+), 0 deletions(-)


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I37c478f3f430f72620af17f1c3329f6ee8515402
Gerrit-Change-Number: 22546
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: newpatchset


Change in osmo-pcu[master]: contrib/osmo-pcu.spec.in: require libosmo* version 1.4.0

2021-01-30 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/22550 )


Change subject: contrib/osmo-pcu.spec.in: require libosmo* version 1.4.0
..

contrib/osmo-pcu.spec.in: require libosmo* version 1.4.0

Keep this file in sync with the requirements in configure.ac.

Change-Id: I8fec52d0d8775df0022da6cd53a213c057bc
---
M contrib/osmo-pcu.spec.in
1 file changed, 4 insertions(+), 4 deletions(-)



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

diff --git a/contrib/osmo-pcu.spec.in b/contrib/osmo-pcu.spec.in
index e197cb7..c3be88c 100644
--- a/contrib/osmo-pcu.spec.in
+++ b/contrib/osmo-pcu.spec.in
@@ -28,10 +28,10 @@
 %if 0%{?suse_version}
 BuildRequires:  systemd-rpm-macros
 %endif
-BuildRequires:  pkgconfig(libosmocore) >= 1.1.0
-BuildRequires:  pkgconfig(libosmogb) >= 1.1.0
-BuildRequires:  pkgconfig(libosmogsm) >= 1.1.0
-BuildRequires:  pkgconfig(libosmovty) >= 1.1.0
+BuildRequires:  pkgconfig(libosmocore) >= 1.4.0
+BuildRequires:  pkgconfig(libosmogb) >= 1.4.0
+BuildRequires:  pkgconfig(libosmogsm) >= 1.4.0
+BuildRequires:  pkgconfig(libosmovty) >= 1.4.0
 %{?systemd_requires}

 %description

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I8fec52d0d8775df0022da6cd53a213c057bc
Gerrit-Change-Number: 22550
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


Change in osmo-pcu[master]: contrib/osmo-pcu.spec.in: add missing libosmoctrl dependency

2021-01-30 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/22546 )

Change subject: contrib/osmo-pcu.spec.in: add missing libosmoctrl dependency
..


Patch Set 2:

(1 comment)

https://gerrit.osmocom.org/c/osmo-pcu/+/22546/1/contrib/osmo-pcu.spec.in
File contrib/osmo-pcu.spec.in:

https://gerrit.osmocom.org/c/osmo-pcu/+/22546/1/contrib/osmo-pcu.spec.in@35
PS1, Line 35: Bui
> configure.ac requires 1.4.0, os best to use the same version here. […]
Done



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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I37c478f3f430f72620af17f1c3329f6ee8515402
Gerrit-Change-Number: 22546
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Sat, 30 Jan 2021 14:41:38 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment


Build failure of network:osmocom:nightly/osmo-pcu in openSUSE_Factory_ARM/aarch64

2021-01-30 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/openSUSE_Factory_ARM/aarch64

Package network:osmocom:nightly/osmo-pcu failed to build in 
openSUSE_Factory_ARM/aarch64

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

Last lines of build log:
[   66s] checking for pkg-config... /usr/bin/pkg-config
[   66s] checking for aarch64-suse-linux-gnu-pkg-config... 
/usr/bin/aarch64-suse-linux-gnu-pkg-config
[   66s] checking pkg-config is at least version 0.20... yes
[   66s] checking for ANSI C header files... (cached) yes
[   66s] checking for LIBOSMOCORE... yes
[   66s] checking for LIBOSMOVTY... yes
[   66s] checking for LIBOSMOCTRL... no
[   66s] configure: error: Package requirements (libosmoctrl >= 1.4.0) were not 
met:
[   66s] 
[   66s] Package 'libosmoctrl', required by 'virtual:world', not found
[   66s] 
[   66s] Consider adjusting the PKG_CONFIG_PATH environment variable if you
[   66s] installed software in a non-standard prefix.
[   66s] 
[   66s] Alternatively, you may set the environment variables LIBOSMOCTRL_CFLAGS
[   66s] and LIBOSMOCTRL_LIBS to avoid the need to call pkg-config.
[   66s] See the pkg-config man page for more details.
[   66s] error: Bad exit status from /var/tmp/rpm-tmp.Hvu18p (%build)
[   66s] 
[   66s] 
[   66s] RPM build errors:
[   66s] Bad exit status from /var/tmp/rpm-tmp.Hvu18p (%build)
[   66s] ### VM INTERACTION START ###
[   69s] [   46.671684] sysrq: Power Off
[   69s] [   46.672880] reboot: Power down
[   69s] ### VM INTERACTION END ###
[   70s] 
[   70s] obs-arm-8 failed "build osmo-pcu.spec" at Sat Jan 30 16:07:05 UTC 2021.
[   70s] 

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


Change in osmo-pcu[master]: contrib/osmo-pcu.spec.in: add missing libosmoctrl dependency

2021-01-30 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/22546 )

Change subject: contrib/osmo-pcu.spec.in: add missing libosmoctrl dependency
..


Patch Set 2: Code-Review+1


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I37c478f3f430f72620af17f1c3329f6ee8515402
Gerrit-Change-Number: 22546
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Sat, 30 Jan 2021 17:38:06 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: ns2: Log ERROR if we cannot transmit a packet due to ENOBUFS

2021-01-30 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/22552 )


Change subject: ns2: Log ERROR if we cannot transmit a packet due to ENOBUFS
..

ns2: Log ERROR if we cannot transmit a packet due to ENOBUFS

Related: OS#4995
Change-Id: I2ba64e96c60e23d2e6c8ecdcab0b52b3833f092c
---
M src/gb/gprs_ns2_fr.c
1 file changed, 7 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/52/22552/1

diff --git a/src/gb/gprs_ns2_fr.c b/src/gb/gprs_ns2_fr.c
index f73033b..096e150 100644
--- a/src/gb/gprs_ns2_fr.c
+++ b/src/gb/gprs_ns2_fr.c
@@ -247,11 +247,15 @@

 static int handle_netif_write(struct osmo_fd *ofd, struct msgb *msg)
 {
-   int rc = write(ofd->fd, msgb_data(msg), msgb_length(msg));
+   struct gprs_ns2_vc_bind *bind = ofd->data;
+   int rc;
+
+   rc = write(ofd->fd, msgb_data(msg), msgb_length(msg));
/* write_queue expects a "-errno" type return value in case of failure 
*/
-   if (rc == -1)
+   if (rc == -1) {
+   LOGBIND(bind, LOGL_ERROR, "error during write to AF_PACKET: 
%s\n", strerror(errno));
return -errno;
-   else
+   } else
return rc;
 }


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I2ba64e96c60e23d2e6c8ecdcab0b52b3833f092c
Gerrit-Change-Number: 22552
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


Change in libosmocore[master]: osmo-ns-dummy: Add simple NS traffic generator

2021-01-30 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/22553 )


Change subject: osmo-ns-dummy: Add simple NS traffic generator
..

osmo-ns-dummy: Add simple NS traffic generator

This adds a simple NS traffic generator that can be used to perform
load testing on NS links, particularly those with limited bandwidth
such as frame-relay E1 lines.

Related: OS#4995
Change-Id: Iad3b694c85962dbbc6b4a27a0ed5bc841add464f
---
M utils/Makefile.am
A utils/osmo-ns-dummy-vty.c
M utils/osmo-ns-dummy.c
3 files changed, 317 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/53/22553/1

diff --git a/utils/Makefile.am b/utils/Makefile.am
index 4fac477..4e54a78 100644
--- a/utils/Makefile.am
+++ b/utils/Makefile.am
@@ -29,7 +29,7 @@
 if ENABLE_EXT_TESTS
 if ENABLE_GB
 noinst_PROGRAMS += osmo-ns-dummy
-osmo_ns_dummy_SOURCES = osmo-ns-dummy.c
+osmo_ns_dummy_SOURCES = osmo-ns-dummy.c osmo-ns-dummy-vty.c
 osmo_ns_dummy_LDADD = $(LDADD) $(TALLOC_LIBS) \
$(top_builddir)/src/gb/libosmogb.la \
$(top_builddir)/src/vty/libosmovty.la \
diff --git a/utils/osmo-ns-dummy-vty.c b/utils/osmo-ns-dummy-vty.c
new file mode 100644
index 000..c88add7
--- /dev/null
+++ b/utils/osmo-ns-dummy-vty.c
@@ -0,0 +1,314 @@
+/* VTY for osmo-ns-dummy */
+
+/* (C) 2021 Harald Welte 
+ *
+ * All Rights Reserved
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see .
+ *
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+static struct gprs_ns2_inst *g_nsi;
+static struct llist_head g_ns_traf_gens = LLIST_HEAD_INIT(g_ns_traf_gens);
+
+/* one NS traffic generator instance.  You can have as many of these as you 
want,
+ * just as long as they have unique names */
+struct ns_traf_gen {
+   struct llist_head list;
+   const char *name;
+   struct {
+   uint16_t nsei;
+   uint16_t bvci;
+   /* size of each packet */
+   uint16_t pkt_size;
+   /* interval between packets in us */
+   uint32_t interval_us;
+   /* fixed (false) or random (true) LSP */
+   bool lsp_randomize;
+   /* (fixeD) Link Selector Parameter */
+   uint32_t lsp;
+   } cfg;
+   struct osmo_fd timerfd;
+   bool running;
+};
+
+#define LOGNTG(ntg, lvl, fmt, args ...) \
+   LOGP(DLGLOBAL, lvl, "traf-gen(%s): " fmt, (ntg)->name, ## args)
+
+/* allocate and transmit one NS message */
+static int ntg_tx_one(struct ns_traf_gen *ntg)
+{
+   struct osmo_gprs_ns2_prim nsp = {};
+   struct msgb *msg = msgb_alloc_headroom(3072, 20, "NS traffic gen");
+   int rc;
+
+   if (!msg)
+   return -ENOMEM;
+   msgb_put(msg, ntg->cfg.pkt_size);
+   nsp.bvci = ntg->cfg.bvci;
+   nsp.nsei = ntg->cfg.nsei;
+   if (ntg->cfg.lsp_randomize)
+   nsp.u.unitdata.link_selector = rand();
+   else
+   nsp.u.unitdata.link_selector = ntg->cfg.lsp;
+   osmo_prim_init(&nsp.oph, SAP_NS, GPRS_NS2_PRIM_UNIT_DATA, 
PRIM_OP_REQUEST, msg);
+   rc = gprs_ns2_recv_prim(g_nsi, &nsp.oph);
+   if (rc < 0)
+   LOGNTG(ntg, LOGL_ERROR, "error transmitting: %d\n", rc);
+
+   return rc;
+}
+
+/* call-back from transmit timer-fd */
+static int ntg_timerfd_cb(struct osmo_fd *ofd, unsigned int what)
+{
+   uint64_t expire_count;
+   struct ns_traf_gen *ntg = ofd->data;
+   unsigned int i;
+   int rc;
+
+   OSMO_ASSERT(what & OSMO_FD_READ);
+
+   rc = read(ofd->fd, (void *) &expire_count, sizeof(expire_count));
+   if (rc < 0 && errno == EAGAIN)
+   return 0;
+   OSMO_ASSERT(rc == sizeof(expire_count));
+
+   for (i = 0; i < expire_count; i++)
+   ntg_tx_one(ntg);
+
+   return 0;
+}
+
+static struct ns_traf_gen *ns_traf_gen_find(const char *name)
+{
+   struct ns_traf_gen *ntg;
+
+   llist_for_each_entry(ntg, &g_ns_traf_gens, list) {
+   if (!strcmp(ntg->name, name))
+   return ntg;
+   

Change in libosmocore[master]: ns2: Use proper return value from write_queue callback function

2021-01-30 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/22551 )


Change subject: ns2: Use proper return value from write_queue callback function
..

ns2: Use proper return value from write_queue callback function

write_queue expects a -errno value on error, not '-1'.

Change-Id: I93c858facfe7e1c533df8dccc4502a574686bc8a
Related: OS#4995
---
M src/gb/gprs_ns2_fr.c
1 file changed, 6 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/51/22551/1

diff --git a/src/gb/gprs_ns2_fr.c b/src/gb/gprs_ns2_fr.c
index 1c88db6..f73033b 100644
--- a/src/gb/gprs_ns2_fr.c
+++ b/src/gb/gprs_ns2_fr.c
@@ -247,7 +247,12 @@

 static int handle_netif_write(struct osmo_fd *ofd, struct msgb *msg)
 {
-   return write(ofd->fd, msgb_data(msg), msgb_length(msg));
+   int rc = write(ofd->fd, msgb_data(msg), msgb_length(msg));
+   /* write_queue expects a "-errno" type return value in case of failure 
*/
+   if (rc == -1)
+   return -errno;
+   else
+   return rc;
 }

 /*! determine if given bind is for FR-GRE encapsulation. */

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I93c858facfe7e1c533df8dccc4502a574686bc8a
Gerrit-Change-Number: 22551
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


Change in osmo-pcu[master]: contrib/osmo-pcu.spec.in: add missing libosmoctrl dependency

2021-01-30 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/22546 )

Change subject: contrib/osmo-pcu.spec.in: add missing libosmoctrl dependency
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I37c478f3f430f72620af17f1c3329f6ee8515402
Gerrit-Change-Number: 22546
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Sat, 30 Jan 2021 19:14:37 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-pcu[master]: contrib/osmo-pcu.spec.in: require libosmo* version 1.4.0

2021-01-30 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/22550 )

Change subject: contrib/osmo-pcu.spec.in: require libosmo* version 1.4.0
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I8fec52d0d8775df0022da6cd53a213c057bc
Gerrit-Change-Number: 22550
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Sat, 30 Jan 2021 19:14:52 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-pcu[master]: contrib/osmo-pcu.spec.in: add missing libosmoctrl dependency

2021-01-30 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/22546 )

Change subject: contrib/osmo-pcu.spec.in: add missing libosmoctrl dependency
..

contrib/osmo-pcu.spec.in: add missing libosmoctrl dependency

Change-Id: I37c478f3f430f72620af17f1c3329f6ee8515402
Fixes: Id35f40d05f3e081f32fddbf1fa34cb338db452ca
---
M contrib/osmo-pcu.spec.in
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/contrib/osmo-pcu.spec.in b/contrib/osmo-pcu.spec.in
index c3be88c..a48a4ed 100644
--- a/contrib/osmo-pcu.spec.in
+++ b/contrib/osmo-pcu.spec.in
@@ -32,6 +32,7 @@
 BuildRequires:  pkgconfig(libosmogb) >= 1.4.0
 BuildRequires:  pkgconfig(libosmogsm) >= 1.4.0
 BuildRequires:  pkgconfig(libosmovty) >= 1.4.0
+BuildRequires:  pkgconfig(libosmoctrl) >= 1.4.0
 %{?systemd_requires}

 %description

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I37c478f3f430f72620af17f1c3329f6ee8515402
Gerrit-Change-Number: 22546
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-pcu[master]: contrib/osmo-pcu.spec.in: require libosmo* version 1.4.0

2021-01-30 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/22550 )

Change subject: contrib/osmo-pcu.spec.in: require libosmo* version 1.4.0
..

contrib/osmo-pcu.spec.in: require libosmo* version 1.4.0

Keep this file in sync with the requirements in configure.ac.

Change-Id: I8fec52d0d8775df0022da6cd53a213c057bc
---
M contrib/osmo-pcu.spec.in
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/contrib/osmo-pcu.spec.in b/contrib/osmo-pcu.spec.in
index e197cb7..c3be88c 100644
--- a/contrib/osmo-pcu.spec.in
+++ b/contrib/osmo-pcu.spec.in
@@ -28,10 +28,10 @@
 %if 0%{?suse_version}
 BuildRequires:  systemd-rpm-macros
 %endif
-BuildRequires:  pkgconfig(libosmocore) >= 1.1.0
-BuildRequires:  pkgconfig(libosmogb) >= 1.1.0
-BuildRequires:  pkgconfig(libosmogsm) >= 1.1.0
-BuildRequires:  pkgconfig(libosmovty) >= 1.1.0
+BuildRequires:  pkgconfig(libosmocore) >= 1.4.0
+BuildRequires:  pkgconfig(libosmogb) >= 1.4.0
+BuildRequires:  pkgconfig(libosmogsm) >= 1.4.0
+BuildRequires:  pkgconfig(libosmovty) >= 1.4.0
 %{?systemd_requires}

 %description

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I8fec52d0d8775df0022da6cd53a213c057bc
Gerrit-Change-Number: 22550
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in osmo-bsc[master]: Allow configuring SI13 CCN_ACTIVE bit from VTY, enable by default on ...

2021-01-30 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/21714 )

Change subject: Allow configuring SI13 CCN_ACTIVE bit from VTY, enable by 
default on osmo-bts
..

Allow configuring SI13 CCN_ACTIVE bit from VTY, enable by default on osmo-bts

This is required in order to tell MS that osmo-pcu now supports
Network Assisted Cell Change (NACC).

Other BTS are not enabled by default since NACC support is not known to
work nor tested there.

Depends: libosmocore.git Change-Id I61991266b95d0c13d51b47906cc07846e9cf1390
Related: SYS#4909
Change-Id: If91d85331d402c3ab9c32b70c2c66cd7ba6ceb28
---
M include/osmocom/bsc/bts.h
M src/osmo-bsc/bsc_vty.c
M src/osmo-bsc/bts_sysmobts.c
M src/osmo-bsc/system_information.c
4 files changed, 33 insertions(+), 0 deletions(-)

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



diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index b81f45f..6797d1c 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -387,6 +387,10 @@
uint8_t net_ctrl_ord;
bool ctrl_ack_type_use_block;
bool egprs_pkt_chan_request;
+   struct {
+   bool active; /* CCN_ACTIVE */
+   bool forced_vty; /* set by VTY ? */
+   } ccn; /* TS 44.060 sec 8.8.2 */
} gprs;

/* threshold (in percent) when BTS shall send CCCH LOAD IND */
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index 4781217..03b87b4 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -758,6 +758,9 @@
bts->gprs.net_ctrl_ord, VTY_NEWLINE);
if (!bts->gprs.ctrl_ack_type_use_block)
vty_out(vty, "  gprs control-ack-type-rach%s", VTY_NEWLINE);
+   if (bts->gprs.ccn.forced_vty)
+   vty_out(vty, "  gprs ccn-active %d%s",
+   bts->gprs.ccn.active ? 1 : 0, VTY_NEWLINE);
vty_out(vty, "  gprs cell bvci %u%s", bts->gprs.cell.bvci,
VTY_NEWLINE);
for (i = 0; i < ARRAY_SIZE(bts->gprs.cell.timer); i++)
@@ -3486,6 +3489,24 @@
return CMD_SUCCESS;
 }

+DEFUN_USRATTR(cfg_bts_gprs_ccn_active,
+ cfg_bts_gprs_ccn_active_cmd,
+ X(BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK),
+ "gprs ccn-active (0|1|default)",
+ GPRS_TEXT
+ "Set CCN_ACTIVE in the GPRS Cell Options IE on the BCCH (SI13)\n"
+ "Disable\n" "Enable\n" "Default based on BTS type support\n")
+{
+   struct gsm_bts *bts = vty->index;
+
+   bts->gprs.ccn.forced_vty = strcmp(argv[0], "default") != 0;
+
+   if (bts->gprs.ccn.forced_vty)
+   bts->gprs.ccn.active = argv[0][0] == '1';
+
+   return CMD_SUCCESS;
+}
+
 DEFUN_USRATTR(cfg_no_bts_gprs_ctrl_ack,
  cfg_no_bts_gprs_ctrl_ack_cmd,
  X(BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK),
@@ -7637,6 +7658,7 @@
install_element(BTS_NODE, &cfg_bts_gprs_rac_cmd);
install_element(BTS_NODE, &cfg_bts_gprs_net_ctrl_ord_cmd);
install_element(BTS_NODE, &cfg_bts_gprs_ctrl_ack_cmd);
+   install_element(BTS_NODE, &cfg_bts_gprs_ccn_active_cmd);
install_element(BTS_NODE, &cfg_no_bts_gprs_ctrl_ack_cmd);
install_element(BTS_NODE, &cfg_bts_gprs_bvci_cmd);
install_element(BTS_NODE, &cfg_bts_gprs_cell_timer_cmd);
diff --git a/src/osmo-bsc/bts_sysmobts.c b/src/osmo-bsc/bts_sysmobts.c
index e319f2c..f24c615 100644
--- a/src/osmo-bsc/bts_sysmobts.c
+++ b/src/osmo-bsc/bts_sysmobts.c
@@ -61,6 +61,7 @@
osmo_bts_set_feature(&model_sysmobts.features, BTS_FEAT_EGPRS);
osmo_bts_set_feature(&model_sysmobts.features, 
BTS_FEAT_PAGING_COORDINATION);
osmo_bts_set_feature(&model_sysmobts.features, BTS_FEAT_IPV6_NSVC);
+   osmo_bts_set_feature(&model_sysmobts.features, BTS_FEAT_CCN);
 
model_sysmobts.nm_att_tlvdef.def[NM_ATT_OSMO_NS_LINK_CFG].type = 
TLV_TYPE_TL16V;

diff --git a/src/osmo-bsc/system_information.c 
b/src/osmo-bsc/system_information.c
index 10b0e4d..d018ec3 100644
--- a/src/osmo-bsc/system_information.c
+++ b/src/osmo-bsc/system_information.c
@@ -1206,6 +1206,7 @@
.pfc_supported = 0,
.dtm_supported = 0,
.bss_paging_coordination = 0,
+   .ccn_active = false,
},
},
.pwr_ctrl_pars = {
@@ -1255,6 +1256,11 @@
else
si13_default.cell_opts.ext_info.bss_paging_coordination = 0;

+   si13_default.cell_opts.ext_info.ccn_active = bts->gprs.ccn.forced_vty ?
+bts->gprs.ccn.active :
+
osmo_bts_has_feature(&bts->model->features,
+

Change in osmo-ci[master]: OBS nightly: don't try to use UNKNOWN as version

2021-01-30 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/22533 )

Change subject: OBS nightly: don't try to use UNKNOWN as version
..


Patch Set 1: Verified+1


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I43c32f73bdfd715db5afdeec3bd8026d3c1fd8eb
Gerrit-Change-Number: 22533
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Sat, 30 Jan 2021 19:16:59 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ci[master]: OBS nightly: don't try to use UNKNOWN as version

2021-01-30 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/22533 )

Change subject: OBS nightly: don't try to use UNKNOWN as version
..

OBS nightly: don't try to use UNKNOWN as version

If the repository doesn't have a git tag yet, git-version-gen will set
the version to UNKNOWN. The debian package build tools will choke on
that, so fall back to using the version from debian/changelog.

Related: OS#4992 (osmo-gbproxy.git doesn't have a tag just yet)
Change-Id: I43c32f73bdfd715db5afdeec3bd8026d3c1fd8eb
---
M scripts/osmocom-nightly-packages.sh
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/scripts/osmocom-nightly-packages.sh 
b/scripts/osmocom-nightly-packages.sh
index a6340d1..44f4a6e 100755
--- a/scripts/osmocom-nightly-packages.sh
+++ b/scripts/osmocom-nightly-packages.sh
@@ -70,7 +70,7 @@
   version=$(echo "$version" | sed  's/-/./g' )

   # deb version
-  if [ -z "$version" ] ; then
+  if [ -z "$version" ] || [ "$version" = "UNKNOWN" ]; then
 version=$(head -1 debian/changelog | cut -d ' ' -f 2 | sed 's,(,,'  | sed 
's,),,')
 version="$version.$DT"
   fi

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I43c32f73bdfd715db5afdeec3bd8026d3c1fd8eb
Gerrit-Change-Number: 22533
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


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

2021-01-30 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22387 )

Change subject: pcu: Introduce test TC_nacc_outbound_success
..

pcu: Introduce test TC_nacc_outbound_success

Related: SYS#4909
Change-Id: I951db4af731e5a7c207f0f407dd78d166e2d3d26
---
M library/GSM_Types.ttcn
M pcu/PCU_Tests.ttcn
M pcu/gen_links.sh
M pcu/osmo-pcu.cfg
M pcu/regen_makefile.sh
5 files changed, 205 insertions(+), 3 deletions(-)

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



diff --git a/library/GSM_Types.ttcn b/library/GSM_Types.ttcn
index 6cc3c08..9710c26 100644
--- a/library/GSM_Types.ttcn
+++ b/library/GSM_Types.ttcn
@@ -415,6 +415,18 @@
 type hexstring GsmBcdString with { variant "HEXORDER(low)" };
 type GsmBcdString BcdMccMnc with { variant "FIELDLENGTH(6)" };

+/* Compute BcdMccMnc from integer values */
+function f_enc_BcdMccMnc(uint16_t mcc, uint16_t mnc, boolean mnc_3_digits) 
return BcdMccMnc {
+   var hexstring mcc_str, mnc_str;
+   mcc_str := str2hex(int2str(mcc));
+   mnc_str := str2hex(int2str(mnc));
+   if (mnc_3_digits == true) {
+   return mcc_str[0] & mcc_str[1] & mnc_str[2] & mcc_str[2] & 
mnc_str[0] & mnc_str[1];
+   } else {
+   return mcc_str[0] & mcc_str[1] & mcc_str[2] & 'F'H & mnc_str[0] 
& mnc_str[1];
+   }
+}
+
 /* 24.008 10.5.1.3 */
 type record LocationAreaIdentification {
BcdMccMnc   mcc_mnc,
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 7d569b1..1e542fa 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -56,6 +56,10 @@
 import from StatsD_CodecPort_CtrlFunct all;
 import from StatsD_Checker all;

+import from IPA_Emulation all;
+import from Osmocom_CTRL_Adapter all;
+import from Osmocom_CTRL_Functions all;
+
 modulepar {
charstring mp_pcu_sock_path := PCU_SOCK_DEFAULT;

@@ -63,6 +67,9 @@

charstring mp_pcu_statsd_ip := "127.0.0.1";
integer mp_pcu_statsd_port := 8125;
+
+   charstring mp_ctrl_neigh_ip := "127.0.0.1";
+   integer mp_ctrl_neigh_port := 4248;
 }


@@ -111,7 +118,7 @@
uint8_t high
 }

-type component RAW_PCU_Test_CT extends bssgp_CT, MS_BTS_IFACE_CT, 
StatsD_ConnHdlr {
+type component RAW_PCU_Test_CT extends bssgp_CT, MS_BTS_IFACE_CT, 
StatsD_ConnHdlr, CTRL_Adapter_CT {
/* PCU interface abstraction component */
var RAW_PCUIF_CT vc_PCUIF;

@@ -3566,6 +3573,184 @@
f_shutdown(__BFILE__, __LINE__, final := true);
 }

+private function f_skip_dummy(integer max_num_iter)
+runs on RAW_PCU_Test_CT return RlcmacDlBlock {
+   var RlcmacDlBlock dl_block;
+   var uint32_t sched_fn;
+   var integer i := 0;
+   while (true) {
+   f_rx_rlcmac_dl_block(dl_block, sched_fn);
+   if (not match(dl_block, tr_RLCMAC_DUMMY_CTRL())) {
+   break;
+   }
+   if (i > max_num_iter) {
+   setverdict(fail, "Rx unexpected DL block: ", dl_block);
+   f_shutdown(__BFILE__, __LINE__);
+   }
+   i := i + 1;
+   }
+   return dl_block;
+}
+
+/* Handle groups of PKT NEIGHBOUR CELL DATA packets */
+private function f_handle_pkt_neighbor_cell_data(inout GprsMS ms, octetstring 
exp_si)
+runs on RAW_PCU_Test_CT {
+   var RlcmacDlBlock dl_block;
+   var uint32_t sched_fn;
+   var integer i := 0;
+   var uint5_t exp_container_idx := 0;
+   var integer si_offset := 0;
+   var integer len;
+   var octetstring exp_si_chunk;
+   var GlobalTfi gtfi := { is_dl_tfi := false, tfi := ms.ul_tbf.tfi };
+
+   dl_block := f_skip_dummy(50);
+
+   while (true) {
+   var template RlcmacDlCtrlMsg exp_msg; exp_msg :=
+   tr_RlcMacDlCtrl_PKT_NEIGH_CELL_DATA(gtfi, 
exp_container_idx);
+
+   /* Make sure last Dl block is a Pkt Neighbour Cell Data */
+   if (not match(dl_block, tr_RLCMAC_DL_CTRL(?, exp_msg))) {
+   setverdict(fail, "Rx unexpected DL block: ", dl_block, 
" vs exp ", tr_RLCMAC_DL_CTRL(?, exp_msg));
+   f_shutdown(__BFILE__, __LINE__);
+   }
+   var PacketNeighbourCellData neigh_data := 
dl_block.ctrl.payload.u.neighbour_cell_data;
+   var PacketNeighbourCellDataContainer cont := 
neigh_data.container_list[0];
+
+   if (cont.cd_length == 31) { /* continues on next message */
+   len := lengthof(cont.container_data);
+   exp_si_chunk := substr(exp_si, si_offset, len);
+   if (cont.container_data != exp_si_chunk) {
+   setverdict(fail, "Rx unexpected SI chunk at 
offset ", si_offset, ": ",
+  cont.container_data, " vs exp ", 
exp_si_chunk);
+   f_shutdown(__BFILE__, __LINE

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

2021-01-30 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22452 )

Change subject: pcu: Introduce test TC_nacc_outbound_rac_ci_resolve_timeout
..

pcu: Introduce test TC_nacc_outbound_rac_ci_resolve_timeout

Related: SYS#4909
Change-Id: Ia09fbfe9aba34a51e0715d1c307de280e3ae0249
---
M pcu/PCU_Tests.ttcn
1 file changed, 63 insertions(+), 1 deletion(-)

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



diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 1e542fa..5a7f58b 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -3583,7 +3583,7 @@
if (not match(dl_block, tr_RLCMAC_DUMMY_CTRL())) {
break;
}
-   if (i > max_num_iter) {
+   if (max_num_iter > 0 and i > max_num_iter) {
setverdict(fail, "Rx unexpected DL block: ", dl_block);
f_shutdown(__BFILE__, __LINE__);
}
@@ -3751,6 +3751,67 @@
f_shutdown(__BFILE__, __LINE__, final := true);
 }

+/* Verify PCU transmits Pkt Cell Change Continue if RAC+CI resolution fails 
during outbound NACC procedure */
+testcase TC_nacc_outbound_rac_ci_resolve_timeout() runs on RAW_PCU_Test_CT {
+   var RlcmacDlBlock dl_block;
+   var PollFnCtx pollctx;
+   var uint32_t sched_fn;
+   var GprsMS ms;
+   var template (value) RlcmacUlCtrlMsg cell_chf_notif;
+   var PCUIF_info_ind info_ind := valueof(ts_PCUIF_INFO_default);
+   var MultislotCap_GPRS mscap_gprs := {
+   gprsmultislotclass := '00011'B,
+   gprsextendeddynalloccap := '0'B
+   };
+   var MSRadioAccessCapabilityV ms_racap := { valueof(ts_RaCapRec('0001'B 
/* E-GSM */, mscap_gprs, omit)) };
+   var GsmArfcn req_arfcn := 862;
+   var uint6_t req_bsic := 43;
+
+   /* Initialize osmo-bsc emulation neighbor resolution CTRL port */
+   f_ipa_ctrl_start_server(mp_ctrl_neigh_ip, mp_ctrl_neigh_port);
+
+   /* Initialize NS/BSSGP side */
+   f_init_bssgp();
+   /* Initialize GPRS MS side */
+   f_init_gprs_ms();
+   ms := g_ms[0]; /* We only use first MS in this test */
+
+   /* Initialize the PCU interface abstraction */
+   f_init_raw(testcasename(), info_ind);
+
+   /* Establish BSSGP connection to the PCU */
+   f_bssgp_establish();
+   f_bssgp_client_llgmm_assign(TLLI_UNUSED, ms.tlli);
+
+   /* Send PACKET RESOURCE REQUEST */
+   pollctx := f_ms_establish_ul_tbf_2phase_access(ms, 
ts_RlcMacUlCtrl_PKT_RES_REQ(ms.tlli, ms_racap));
+   /* Pkt Uplink Assignment above sets poll+rrbp requesting PACKET CONTROL 
ACK */
+   f_ms_tx_ul_block(ms, ts_RLCMAC_CTRL_ACK(ms.tlli), pollctx.fn, nr := 
pollctx.tstrxbts);
+
+   /* Start NACC from MS side */
+   cell_chf_notif := ts_RlcMacUlCtrl_PKT_CELL_CHG_NOTIF(ms.ul_tbf.tfi, 
req_arfcn, req_bsic);
+   f_ms_tx_ul_block(ms, ts_RLC_UL_CTRL_ACK(cell_chf_notif), 0, nr := 
f_ms_tx_TsTrxBtsNum(ms));
+
+   /* osmo-pcu should now ask for resolution: */
+   f_ipa_ctrl_wait_link_up();
+   var charstring ctrl_var := "neighbor_resolve_cgi_ps_from_lac_ci." &
+   int2str(info_ind.lac) & "." &
+   int2str(info_ind.cell_id) & "." &
+   int2str(req_arfcn) & "." &
+   int2str(req_bsic);
+   /* we receive RAC+CI resolution request, but we never answer to it, 
timeout should occur */
+   f_ctrl_exp_get(IPA_CTRL, ctrl_var, omit);
+
+   /* Wait until we receive something non-dummy */
+   dl_block := f_skip_dummy(0);
+   /* Make sure it is a Pkt Cell Chg Continue */
+   if (not match(dl_block, tr_RLCMAC_DL_CTRL(?, 
tr_RlcMacDlCtrl_PKT_CELL_CHG_CONTINUE))) {
+   setverdict(fail, "Rx unexpected DL block: ", dl_block);
+   }
+
+   f_shutdown(__BFILE__, __LINE__, final := true);
+}
+
 control {
execute( TC_pcuif_suspend() );
execute( TC_pcuif_suspend_active_tbf() );
@@ -3825,6 +3886,7 @@

execute( TC_pcuif_info_ind_subsequent() );
execute( TC_nacc_outbound_success() );
+   execute( TC_nacc_outbound_rac_ci_resolve_timeout() );
 }

 }

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


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

2021-01-30 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22453 )

Change subject: pcu: Introduce test TC_nacc_outbound_si_resolve_timeout
..

pcu: Introduce test TC_nacc_outbound_si_resolve_timeout

Related: SYS#4909
Change-Id: If0032b940685efaaa8f65357c56c3383fab3e283
---
M pcu/PCU_Tests.ttcn
1 file changed, 77 insertions(+), 0 deletions(-)

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



diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 5a7f58b..e59a3c9 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -3812,6 +3812,82 @@
f_shutdown(__BFILE__, __LINE__, final := true);
 }

+/* Verify PCU transmits Pkt Cell Change Continue if SI resolution fails during 
outbound NACC procedure */
+testcase TC_nacc_outbound_si_resolve_timeout() runs on RAW_PCU_Test_CT {
+   var RlcmacDlBlock dl_block;
+   var PollFnCtx pollctx;
+   var uint32_t sched_fn;
+   var GprsMS ms;
+   var template (value) RlcmacUlCtrlMsg cell_chf_notif;
+   var PCUIF_info_ind info_ind := valueof(ts_PCUIF_INFO_default);
+   var MultislotCap_GPRS mscap_gprs := {
+   gprsmultislotclass := '00011'B,
+   gprsextendeddynalloccap := '0'B
+   };
+   var MSRadioAccessCapabilityV ms_racap := { valueof(ts_RaCapRec('0001'B 
/* E-GSM */, mscap_gprs, omit)) };
+   var GsmArfcn req_arfcn := 862;
+   var uint6_t req_bsic := 43;
+   var BssgpCellId src := 
valueof(ts_BssgpCellId(ts_RAI(ts_LAI(f_enc_BcdMccMnc(info_ind.mcc, 
info_ind.mnc, info_ind.mnc_3_digits == 1), /* '262F42'H */
+   
info_ind.lac),
+info_ind.rac),
+ info_ind.cell_id));
+   var BssgpCellId dst := valueof(ts_BssgpCellId(ts_RAI(ts_LAI('023F43'H, 
/* Decided by test itself (emulating BSC) */
+   423),
+2),
+ 5));
+   var template RIM_Routing_Address src_addr := 
t_RIM_Routing_Address_cid(src);
+   var template RIM_Routing_Address dst_addr := 
t_RIM_Routing_Address_cid(dst);
+
+   /* Initialize osmo-bsc emulation neighbor resolution CTRL port */
+   f_ipa_ctrl_start_server(mp_ctrl_neigh_ip, mp_ctrl_neigh_port);
+
+   /* Initialize NS/BSSGP side */
+   f_init_bssgp();
+   /* Initialize GPRS MS side */
+   f_init_gprs_ms();
+   ms := g_ms[0]; /* We only use first MS in this test */
+
+   /* Initialize the PCU interface abstraction */
+   f_init_raw(testcasename(), info_ind);
+
+   /* Establish BSSGP connection to the PCU */
+   f_bssgp_establish();
+   f_bssgp_client_llgmm_assign(TLLI_UNUSED, ms.tlli);
+
+   /* Send PACKET RESOURCE REQUEST */
+   pollctx := f_ms_establish_ul_tbf_2phase_access(ms, 
ts_RlcMacUlCtrl_PKT_RES_REQ(ms.tlli, ms_racap));
+   /* Pkt Uplink Assignment above sets poll+rrbp requesting PACKET CONTROL 
ACK */
+   f_ms_tx_ul_block(ms, ts_RLCMAC_CTRL_ACK(ms.tlli), pollctx.fn, nr := 
pollctx.tstrxbts);
+
+   /* Start NACC from MS side */
+   cell_chf_notif := ts_RlcMacUlCtrl_PKT_CELL_CHG_NOTIF(ms.ul_tbf.tfi, 
req_arfcn, req_bsic);
+   f_ms_tx_ul_block(ms, ts_RLC_UL_CTRL_ACK(cell_chf_notif), 0, nr := 
f_ms_tx_TsTrxBtsNum(ms));
+
+   /* osmo-pcu should now ask for resolution: */
+   f_ipa_ctrl_wait_link_up();
+   var charstring ctrl_var := "neighbor_resolve_cgi_ps_from_lac_ci." &
+   int2str(info_ind.lac) & "." &
+   int2str(info_ind.cell_id) & "." &
+   int2str(req_arfcn) & "." &
+   int2str(req_bsic);
+   f_ctrl_exp_get(IPA_CTRL, ctrl_var, "023-43-423-2-5");
+
+   /* RIM procedure: */
+   
RIM.receive(tr_RAN_INFORMATION_REQUEST(tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID,
 dst_addr),
+  
tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, src_addr),
+  
tr_RAN_Information_Request_RIM_Container));
+   /* We never answer the RIM procude -> PCU timeouts and should send Pkt 
Cell Chg continue */
+
+   /* Wait until we receive something non-dummy */
+   dl_block := f_skip_dummy(0);
+   /* Make sure it is a Pkt Cell Chg Continue */
+   if (not match(dl_block, tr_RLCMAC_DL_CTRL(?, 
tr_RlcMacDlCtrl_PKT_CELL_CHG_CONTINUE))) {
+   setverdict(fail, "Rx unexpected DL block: ", dl_block);
+   }
+
+   f_shutdown(__BFILE__, __LINE__, final := true);
+}
+
 control {
execute( TC_pcuif_suspend() );
execute( TC_pcuif_suspend_active

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

2021-01-30 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22454 )

Change subject: pcu: Introduce test 
TC_nacc_outbound_rac_ci_resolve_fail_parse_response
..

pcu: Introduce test TC_nacc_outbound_rac_ci_resolve_fail_parse_response

Related: SYS#4909
Change-Id: If7efddb1ae2ccb580fe85c8df45c9ccdb818c6f3
---
M pcu/PCU_Tests.ttcn
1 file changed, 62 insertions(+), 0 deletions(-)

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



diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index e59a3c9..9b17f6f 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -3812,6 +3812,67 @@
f_shutdown(__BFILE__, __LINE__, final := true);
 }

+/* Verify PCU transmits Pkt Cell Change Continue if RAC+CI resolution fails 
during outbound NACC procedure */
+testcase TC_nacc_outbound_rac_ci_resolve_fail_parse_response() runs on 
RAW_PCU_Test_CT {
+   var RlcmacDlBlock dl_block;
+   var PollFnCtx pollctx;
+   var uint32_t sched_fn;
+   var GprsMS ms;
+   var template (value) RlcmacUlCtrlMsg cell_chf_notif;
+   var PCUIF_info_ind info_ind := valueof(ts_PCUIF_INFO_default);
+   var MultislotCap_GPRS mscap_gprs := {
+   gprsmultislotclass := '00011'B,
+   gprsextendeddynalloccap := '0'B
+   };
+   var MSRadioAccessCapabilityV ms_racap := { valueof(ts_RaCapRec('0001'B 
/* E-GSM */, mscap_gprs, omit)) };
+   var GsmArfcn req_arfcn := 862;
+   var uint6_t req_bsic := 43;
+
+   /* Initialize osmo-bsc emulation neighbor resolution CTRL port */
+   f_ipa_ctrl_start_server(mp_ctrl_neigh_ip, mp_ctrl_neigh_port);
+
+   /* Initialize NS/BSSGP side */
+   f_init_bssgp();
+   /* Initialize GPRS MS side */
+   f_init_gprs_ms();
+   ms := g_ms[0]; /* We only use first MS in this test */
+
+   /* Initialize the PCU interface abstraction */
+   f_init_raw(testcasename(), info_ind);
+
+   /* Establish BSSGP connection to the PCU */
+   f_bssgp_establish();
+   f_bssgp_client_llgmm_assign(TLLI_UNUSED, ms.tlli);
+
+   /* Send PACKET RESOURCE REQUEST */
+   pollctx := f_ms_establish_ul_tbf_2phase_access(ms, 
ts_RlcMacUlCtrl_PKT_RES_REQ(ms.tlli, ms_racap));
+   /* Pkt Uplink Assignment above sets poll+rrbp requesting PACKET CONTROL 
ACK */
+   f_ms_tx_ul_block(ms, ts_RLCMAC_CTRL_ACK(ms.tlli), pollctx.fn, nr := 
pollctx.tstrxbts);
+
+   /* Start NACC from MS side */
+   cell_chf_notif := ts_RlcMacUlCtrl_PKT_CELL_CHG_NOTIF(ms.ul_tbf.tfi, 
req_arfcn, req_bsic);
+   f_ms_tx_ul_block(ms, ts_RLC_UL_CTRL_ACK(cell_chf_notif), 0, nr := 
f_ms_tx_TsTrxBtsNum(ms));
+
+   /* osmo-pcu should now ask for resolution: */
+   f_ipa_ctrl_wait_link_up();
+   var charstring ctrl_var := "neighbor_resolve_cgi_ps_from_lac_ci." &
+   int2str(info_ind.lac) & "." &
+   int2str(info_ind.cell_id) & "." &
+   int2str(req_arfcn) & "." &
+   int2str(req_bsic);
+   /* we receive RAC+CI resolution request and we send incorrectlt 
formated response */
+   f_ctrl_exp_get(IPA_CTRL, ctrl_var, "foobar-error");
+
+   /* Wait until we receive something non-dummy */
+   dl_block := f_skip_dummy(0);
+   /* Make sure it is a Pkt Cell Chg Continue */
+   if (not match(dl_block, tr_RLCMAC_DL_CTRL(?, 
tr_RlcMacDlCtrl_PKT_CELL_CHG_CONTINUE))) {
+   setverdict(fail, "Rx unexpected DL block: ", dl_block);
+   }
+
+   f_shutdown(__BFILE__, __LINE__, final := true);
+}
+
 /* Verify PCU transmits Pkt Cell Change Continue if SI resolution fails during 
outbound NACC procedure */
 testcase TC_nacc_outbound_si_resolve_timeout() runs on RAW_PCU_Test_CT {
var RlcmacDlBlock dl_block;
@@ -3963,6 +4024,7 @@
execute( TC_pcuif_info_ind_subsequent() );
execute( TC_nacc_outbound_success() );
execute( TC_nacc_outbound_rac_ci_resolve_timeout() );
+   execute( TC_nacc_outbound_rac_ci_resolve_fail_parse_response() );
execute( TC_nacc_outbound_si_resolve_timeout() );
 }


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


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

2021-01-30 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22488 )

Change subject: pcu: Introduce test TC_nacc_outbound_rac_ci_resolve_conn_refused
..

pcu: Introduce test TC_nacc_outbound_rac_ci_resolve_conn_refused

Change-Id: Ia0452879edb958098598e9e1c943f4e1e458a9bf
---
M pcu/PCU_Tests.ttcn
1 file changed, 57 insertions(+), 0 deletions(-)

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



diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 316ab65..6a78975 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -3837,6 +3837,62 @@
 }

 /* Verify PCU transmits Pkt Cell Change Continue if RAC+CI resolution fails 
during outbound NACC procedure */
+testcase TC_nacc_outbound_rac_ci_resolve_conn_refused() runs on 
RAW_PCU_Test_CT {
+   var RlcmacDlBlock dl_block;
+   var PollFnCtx pollctx;
+   var uint32_t sched_fn;
+   var GprsMS ms;
+   var template (value) RlcmacUlCtrlMsg cell_chf_notif;
+   var PCUIF_info_ind info_ind := valueof(ts_PCUIF_INFO_default);
+   var MultislotCap_GPRS mscap_gprs := {
+   gprsmultislotclass := '00011'B,
+   gprsextendeddynalloccap := '0'B
+   };
+   var MSRadioAccessCapabilityV ms_racap := { valueof(ts_RaCapRec('0001'B 
/* E-GSM */, mscap_gprs, omit)) };
+   var GsmArfcn req_arfcn := 862;
+   var uint6_t req_bsic := 43;
+
+   /* In here we explicitly avoid starting osmo-bsc emulation neighbor
+* resolution CTRL port, to trigger Conn Refused by socket:
+* f_ipa_ctrl_start_server(mp_ctrl_neigh_ip, mp_ctrl_neigh_port);
+*/
+
+   /* Initialize NS/BSSGP side */
+   f_init_bssgp();
+   /* Initialize GPRS MS side */
+   f_init_gprs_ms();
+   ms := g_ms[0]; /* We only use first MS in this test */
+
+   /* Initialize the PCU interface abstraction */
+   f_init_raw(testcasename(), info_ind);
+
+   /* Make sure we are not affected by full cache from previous tests */
+   f_pcuvty_flush_neigh_caches();
+
+   /* Establish BSSGP connection to the PCU */
+   f_bssgp_establish();
+   f_bssgp_client_llgmm_assign(TLLI_UNUSED, ms.tlli);
+
+   /* Send PACKET RESOURCE REQUEST */
+   pollctx := f_ms_establish_ul_tbf_2phase_access(ms, 
ts_RlcMacUlCtrl_PKT_RES_REQ(ms.tlli, ms_racap));
+   /* Pkt Uplink Assignment above sets poll+rrbp requesting PACKET CONTROL 
ACK */
+   f_ms_tx_ul_block(ms, ts_RLCMAC_CTRL_ACK(ms.tlli), pollctx.fn, nr := 
pollctx.tstrxbts);
+
+   /* Start NACC from MS side */
+   cell_chf_notif := ts_RlcMacUlCtrl_PKT_CELL_CHG_NOTIF(ms.ul_tbf.tfi, 
req_arfcn, req_bsic);
+   f_ms_tx_ul_block(ms, ts_RLC_UL_CTRL_ACK(cell_chf_notif), 0, nr := 
f_ms_tx_TsTrxBtsNum(ms));
+
+   /* Wait until we receive something non-dummy */
+   dl_block := f_skip_dummy(0);
+   /* Make sure it is a Pkt Cell Chg Continue */
+   if (not match(dl_block, tr_RLCMAC_DL_CTRL(?, 
tr_RlcMacDlCtrl_PKT_CELL_CHG_CONTINUE))) {
+   setverdict(fail, "Rx unexpected DL block: ", dl_block);
+   }
+
+   f_shutdown(__BFILE__, __LINE__, final := true);
+}
+
+/* Verify PCU transmits Pkt Cell Change Continue if RAC+CI resolution fails 
during outbound NACC procedure */
 testcase TC_nacc_outbound_rac_ci_resolve_timeout() runs on RAW_PCU_Test_CT {
var RlcmacDlBlock dl_block;
var PollFnCtx pollctx;
@@ -4118,6 +4174,7 @@
execute( TC_pcuif_info_ind_subsequent() );
execute( TC_nacc_outbound_success() );
execute( TC_nacc_outbound_success_twice() );
+   execute( TC_nacc_outbound_rac_ci_resolve_conn_refused() );
execute( TC_nacc_outbound_rac_ci_resolve_timeout() );
execute( TC_nacc_outbound_rac_ci_resolve_fail_parse_response() );
execute( TC_nacc_outbound_si_resolve_timeout() );

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


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

2021-01-30 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22487 )

Change subject: pcu: Introduce test TC_nacc_outbound_success_twice
..

pcu: Introduce test TC_nacc_outbound_success_twice

Change-Id: Ia7b1584b3f7abfa2697a1f155c8b7788a3b0722e
---
M pcu/PCU_Tests.ttcn
1 file changed, 145 insertions(+), 50 deletions(-)

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



diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 9b17f6f..316ab65 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -112,6 +112,12 @@

f_PCUIF_AF2addr_type(mp_nsconfig.nsvc[0].provider.ip.address_family), 
mp_nsconfig.nsvc[0].provider.ip.local_ip)
 }

+/* Passed in RAN-INFO message from emulated neighbor using RIM */
+const octetstring si1_default := '198fb1792b'O;
+const octetstring si3_default := '1b753000f110236ec9033c274740793c0b2b2b'O;
+const octetstring si13_default := 
'009000185a6fc9e08410ab2b2b2b2b2b2b2b2b2b2b'O;
+const octetstring si_default := si1_default & si3_default & si13_default;
+
 type record lqual_range {
/* component reference to the IPA_Client component used for RSL */
uint8_t low,
@@ -197,6 +203,24 @@
f_vty_config2(PCUVTY, {"pcu"}, cmd);
 }

+private function f_pcuvty_flush_neigh_caches() runs on RAW_PCU_Test_CT {
+   f_pcuvty_set_neigh_caches(0, 0);
+}
+
+private function f_pcuvty_set_neigh_caches(integer neigh_cache_secs := -1, 
integer si_cache_secs := -1)
+runs on RAW_PCU_Test_CT {
+   if (neigh_cache_secs == -1) {
+   f_vty_config2(PCUVTY, {"pcu"}, "timer X10 default");
+   } else {
+   f_vty_config2(PCUVTY, {"pcu"}, "timer X10 " & 
int2str(neigh_cache_secs));
+   }
+   if (si_cache_secs == -1) {
+   f_vty_config2(PCUVTY, {"pcu"}, "timer X11 default");
+   } else {
+   f_vty_config2(PCUVTY, {"pcu"}, "timer X11 " & 
int2str(si_cache_secs));
+   }
+}
+
 private function f_init_vty(charstring id, boolean egprs_only) runs on 
RAW_PCU_Test_CT {
map(self:PCUVTY, system:PCUVTY);
f_vty_set_prompts(PCUVTY);
@@ -3660,42 +3684,80 @@
return;
 }

+/* Start NACC from MS side */
+private function f_outbound_nacc_success(inout GprsMS ms, PCUIF_info_ind 
info_ind,
+boolean exp_rac_ci_query := true, 
boolean exp_si_query := true)
+runs on RAW_PCU_Test_CT {
+   var template (value) RlcmacUlCtrlMsg cell_chf_notif;
+   var RlcmacDlBlock dl_block;
+   var uint32_t sched_fn;
+   var GsmArfcn req_arfcn := 862;
+   var uint6_t req_bsic := 43;
+
+   /* Start NACC from MS side */
+   cell_chf_notif := ts_RlcMacUlCtrl_PKT_CELL_CHG_NOTIF(ms.ul_tbf.tfi, 
req_arfcn, req_bsic);
+   f_ms_tx_ul_block(ms, ts_RLC_UL_CTRL_ACK(cell_chf_notif), 0, nr := 
f_ms_tx_TsTrxBtsNum(ms));
+
+   if (exp_rac_ci_query == true) {
+   /* osmo-pcu should now ask for resolution: */
+   f_ipa_ctrl_wait_link_up();
+   var charstring ctrl_var := 
"neighbor_resolve_cgi_ps_from_lac_ci." &
+   int2str(info_ind.lac) & "." &
+   int2str(info_ind.cell_id) & "." &
+   int2str(req_arfcn) & "." &
+   int2str(req_bsic);
+   f_ctrl_exp_get(IPA_CTRL, ctrl_var, "023-43-423-2-5");
+   }
+
+   if (exp_si_query == true) {
+   /* RIM procedure: */
+   var BssgpCellId src := 
valueof(ts_BssgpCellId(ts_RAI(ts_LAI(f_enc_BcdMccMnc(info_ind.mcc, 
info_ind.mnc, info_ind.mnc_3_digits == 1), /* '262F42'H */
+   
info_ind.lac),
+
info_ind.rac),
+ 
info_ind.cell_id));
+   var BssgpCellId dst := 
valueof(ts_BssgpCellId(ts_RAI(ts_LAI('023F43'H, /* Decided by test itself 
(emulating BSC) */
+   
423),
+2),
+ 5));
+   var template RIM_Routing_Address src_addr := 
t_RIM_Routing_Address_cid(src);
+   var template RIM_Routing_Address dst_addr := 
t_RIM_Routing_Address_cid(dst);
+   var template RAN_Information_RIM_Container res_cont;
+   res_cont := 
ts_RAN_Information_RIM_Container(ts_RIM_Application_Identity(RIM_APP_ID_NACC),
+
ts_RIM_Sequence_Number(2),
+
ts_RIM_PDU_Indications(false, RIM_PDU_TYPE_SING_REP),
+

Change in osmo-ttcn3-hacks[master]: CTRL_Adapter: Add function f_ipa_ctrl_wait_link_down

2021-01-30 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22519 )

Change subject: CTRL_Adapter: Add function f_ipa_ctrl_wait_link_down
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22519
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: Ia9f08dae76774925de8a08c7e313965280cb51b0
Gerrit-Change-Number: 22519
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Sat, 30 Jan 2021 19:18:12 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: CTRL_Adapter: Add function f_ipa_ctrl_wait_link_down

2021-01-30 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22519 )

Change subject: CTRL_Adapter: Add function f_ipa_ctrl_wait_link_down
..

CTRL_Adapter: Add function f_ipa_ctrl_wait_link_down

Change-Id: Ia9f08dae76774925de8a08c7e313965280cb51b0
---
M library/Osmocom_CTRL_Adapter.ttcn
1 file changed, 14 insertions(+), 0 deletions(-)

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



diff --git a/library/Osmocom_CTRL_Adapter.ttcn 
b/library/Osmocom_CTRL_Adapter.ttcn
index fefff8b..e1fba1b 100644
--- a/library/Osmocom_CTRL_Adapter.ttcn
+++ b/library/Osmocom_CTRL_Adapter.ttcn
@@ -40,6 +40,20 @@
}
 }

+/* wait for IPA CTRL link to connect and send UP */
+function f_ipa_ctrl_wait_link_down()
+runs on CTRL_Adapter_CT {
+   timer T := 10.0;
+   T.start;
+   alt {
+   [] IPA_CTRL.receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_DOWN)) { }
+   [] T.timeout {
+   setverdict(fail, "Timeout CTRL waiting for ASP_IPA_EVENT_DOWN");
+   mtc.stop;
+   }
+   }
+}
+
 /*! Start the CTRL client connection to the specified CTRL IP+Port server*/
 function f_ipa_ctrl_start_client(charstring bsc_host, PortNumber bsc_port)
 runs on CTRL_Adapter_CT {

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


Change in osmo-ttcn3-hacks[master]: IPA_Emulation: Support keeping server alive after first client discon...

2021-01-30 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22520 )

Change subject: IPA_Emulation: Support keeping server alive after first client 
disconnects
..

IPA_Emulation: Support keeping server alive after first client disconnects

Change-Id: I4c133a889df0a5a060b5c52a1ca40fa9b8695c2e
---
M library/IPA_Emulation.ttcnpp
1 file changed, 9 insertions(+), 2 deletions(-)

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



diff --git a/library/IPA_Emulation.ttcnpp b/library/IPA_Emulation.ttcnpp
index 60c6061..906664f 100644
--- a/library/IPA_Emulation.ttcnpp
+++ b/library/IPA_Emulation.ttcnpp
@@ -240,6 +240,9 @@
var IpaMode g_mode;
var boolean g_ccm_enabled;
var IpaInitBehavior g_init_behavior;
+   /* Shall we stop the component once the client disconnects, or keep
+* running to let next user in ? */
+   var boolean g_server_stop_on_ipa_ev_down := true;
var IPA_CCM_Parameters  g_ccm_pars := c_IPA_default_ccm_pars;
 }

@@ -549,11 +552,13 @@
 /* main function to use for a server-side IPA implementation */
 function main_server(charstring local_host, IPL4asp_Types.PortNumber 
local_port,
 boolean ccm_enabled := true,
-IpaInitBehavior init_behavior := IPA_INIT_SEND_IPA_ID_GET)
+IpaInitBehavior init_behavior := IPA_INIT_SEND_IPA_ID_GET,
+boolean server_stop_on_ipa_ev_down := true)
 runs on IPA_Emulation_CT {
g_mode := IPA_MODE_SERVER;
g_ccm_enabled := ccm_enabled;
g_init_behavior := init_behavior;
+   g_server_stop_on_ipa_ev_down := server_stop_on_ipa_ev_down;
f_bind(local_host, local_port);
ScanEvents();
 }
@@ -761,7 +766,9 @@
log("IPA: Closed");
g_self_conn_id := -1;
f_send_IPA_EVT(ts_ASP_IPA_EV(ASP_IPA_EVENT_DOWN, 
asp_evt.connClosed.connId));
-   self.stop;
+   if (g_mode != IPA_MODE_SERVER or 
g_server_stop_on_ipa_ev_down) {
+   self.stop;
+   }
}

[] 
IPA_PORT.receive(Socket_API_Definitions.PortEvent:{result:={errorCode:=ERROR_SOCKET,
 connId:=?, os_error_code:=?, os_error_text:=?}}) -> value port_evt {

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


Change in osmo-ttcn3-hacks[master]: CTRL_Adapter: Keep server alive after first client disconnects

2021-01-30 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22521 )

Change subject: CTRL_Adapter: Keep server alive after first client disconnects
..

CTRL_Adapter: Keep server alive after first client disconnects

It can be expected from CTRL clients to connect and disconnect several
times as several commands are sent, so let's by default enable it (only
user of this CTRL servcer in PCU_Tests needs it).

Change-Id: Idddc27671d1b823dfbc62bcf7be673e51b574d63
---
M library/Osmocom_CTRL_Adapter.ttcn
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/library/Osmocom_CTRL_Adapter.ttcn 
b/library/Osmocom_CTRL_Adapter.ttcn
index e1fba1b..adc2887 100644
--- a/library/Osmocom_CTRL_Adapter.ttcn
+++ b/library/Osmocom_CTRL_Adapter.ttcn
@@ -81,7 +81,8 @@
map(vc_CTRL_IPA:IPA_PORT, system:IPA_CODEC_PT);
connect(vc_CTRL_IPA:IPA_CTRL_PORT, self:IPA_CTRL);

-   vc_CTRL_IPA.start(IPA_Emulation.main_server(listen_host, listen_port, 
false));
+   vc_CTRL_IPA.start(IPA_Emulation.main_server(listen_host, listen_port, 
false,
+ server_stop_on_ipa_ev_down := false));
 }

 function f_ipa_ctrl_stop() runs on CTRL_Adapter_CT {

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


Change in osmo-ttcn3-hacks[master]: GBProxy_Tests: fix TC_rim_* tests

2021-01-30 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22525 )

Change subject: GBProxy_Tests: fix TC_rim_* tests
..

GBProxy_Tests: fix TC_rim_* tests

The TC_rim tests do not use the RIM templates from Osmocom_Gb_Types as
intended.

Change-Id: Ie484f288aa0515ef4df4a3cf7f8a347a3f3cf587
Related: SYS#5103
---
M gbproxy/GBProxy_Tests.ttcn
M library/Osmocom_Gb_Types.ttcn
2 files changed, 248 insertions(+), 68 deletions(-)

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



diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index 4879521..506ed38 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -2901,20 +2901,35 @@
 runs on GlobalTest_CT
 {
var BssgpCellId cell_id := g_pcu[pcu_idx].cfg.bvc[bvc_idx].cell_id;
-   var template (value) RIM_Routing_Information ri_pcu;
-   var template (value) RIM_Routing_Information ri_sgsn;
-   var template (value) RAN_Information_Request_RIM_Container cont;
+   var template (value) RAN_Information_Request_RIM_Container cont_tx;
+   var template RAN_Information_Request_RIM_Container cont_rx;
+   var template RIM_Routing_Address ra_pcu;
+   var template RIM_Routing_Address ra_sgsn;

-   ri_sgsn := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, 
t_RIM_Routing_Address_cid(cell_id_sgsn));
-   ri_pcu := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, 
t_RIM_Routing_Address_cid(cell_id));
-   cont := 
ts_RAN_Information_Request_RIM_Container(ts_RIM_Application_Identity(RIM_APP_ID_NACC),
-
ts_RIM_Sequence_Number(0),
-
ts_RIM_PDU_Indications(false, RIM_PDU_TYPE_STOP));
-   f_rim_pcu2sgsn(ts_RAN_INFORMATION_REQUEST(dst := ri_sgsn, src := 
ri_pcu, cont := cont),
-   tr_RAN_INFORMATION_REQUEST(dst := ri_sgsn, src := 
ri_pcu, cont := cont),
-   pcu_idx);
-   f_rim_sgsn2pcu(ts_RAN_INFORMATION_REQUEST(dst := ri_pcu, src := 
ri_sgsn, cont := cont),
-   tr_RAN_INFORMATION_REQUEST(dst := ri_pcu, src := 
ri_sgsn, cont := cont),
+   ra_pcu := t_RIM_Routing_Address_cid(cell_id);
+   ra_sgsn := t_RIM_Routing_Address_cid(cell_id_sgsn);
+
+   cont_tx := 
ts_RAN_Information_Request_RIM_Container(ts_RIM_Application_Identity(RIM_APP_ID_NACC),
+   
ts_RIM_Sequence_Number(0),
+   
ts_RIM_PDU_Indications(false, RIM_PDU_TYPE_STOP));
+   cont_rx := 
tr_RAN_Information_Request_RIM_Container(tr_RIM_Application_Identity(RIM_APP_ID_NACC),
+   
tr_RIM_Sequence_Number(0),
+   
tr_RIM_PDU_Indications(false, RIM_PDU_TYPE_STOP));
+
+   f_rim_pcu2sgsn(ts_RAN_INFORMATION_REQUEST(dst := 
ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_sgsn),
+ src := 
ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_pcu),
+ cont := cont_tx),
+  tr_RAN_INFORMATION_REQUEST(dst := 
tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_sgsn),
+ src := 
tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_pcu),
+ cont := cont_rx),
+  pcu_idx);
+
+   f_rim_sgsn2pcu(ts_RAN_INFORMATION_REQUEST(dst := 
ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_pcu),
+ src := 
ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_sgsn),
+ cont := cont_tx),
+  tr_RAN_INFORMATION_REQUEST(dst := 
tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_pcu),
+ src := 
tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_sgsn),
+ cont := cont_rx),
sgsn_idx, pcu_idx);
 }
 testcase TC_rim_info_req() runs on GlobalTest_CT
@@ -2930,20 +2945,36 @@
 runs on GlobalTest_CT
 {
var BssgpCellId cell_id := g_pcu[pcu_idx].cfg.bvc[bvc_idx].cell_id;
-   var template (value) RIM_Routing_Information ri_pcu;
-   var template (value) RIM_Routing_Information ri_sgsn;
-   var template (value) RAN_Information_RIM_Container cont;
+   var template (value) RAN_Information_RIM_Container cont_tx;
+   var template RAN_Information_RIM_Container cont_rx;
+   var template RIM_Routing_Address ra_pcu;
+   var template RIM_Routing_Address ra_sgsn;

-   ri_sgsn := ts_RIM_Routing_Infor

Change in osmo-hlr[master]: Fix Coverity Warnings.

2021-01-30 Thread keith
keith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-hlr/+/22554 )


Change subject: Fix Coverity Warnings.
..

Fix Coverity Warnings.

Explicitly check filter_type is not NULL even though the current code
never passed NULL filter_type unless filter was also NULL

Remove unreachable code.

Change-Id: Ib2bd9b2d6e9e559e61a895a25235669dae05fdf6
Related: coverity CID#216865
Related: coverity CID#216867
---
M src/db_hlr.c
1 file changed, 3 insertions(+), 7 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/54/22554/1

diff --git a/src/db_hlr.c b/src/db_hlr.c
index a181c0c..a4c467e 100644
--- a/src/db_hlr.c
+++ b/src/db_hlr.c
@@ -663,7 +663,7 @@
return -EIO;
}

-   if (filter && strcmp(filter_type, "last_lu_seen") != 0) {
+   if (filter_type && filter && strcmp(filter_type, "last_lu_seen") != 0) {
if (strcmp(filter, "on") == 0) {
sprintf(search, "%s", "1");
} else if (strcmp(filter, "off") == 0) {
@@ -704,15 +704,11 @@
db_remove_reset(stmt);
if (rc != SQLITE_DONE) {
*err = sqlite3_errmsg(dbc->db);
-   return -EIO;
-   } else if (rc == SQLITE_DONE) {
-   *err = NULL;
-   return 0;
-   } else {
-   *err = sqlite3_errmsg(dbc->db);
LOGP(DAUC, LOGL_ERROR, "Cannot read subscribers from db:: 
%s\n", *err);
return rc;
}
+   *err = NULL;
+   return 0;
 }

 /*! Retrieve subscriber data from the HLR database.

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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: Ib2bd9b2d6e9e559e61a895a25235669dae05fdf6
Gerrit-Change-Number: 22554
Gerrit-PatchSet: 1
Gerrit-Owner: keith 
Gerrit-MessageType: newchange


Change in osmo-hlr[master]: Fix Coverity Warnings

2021-01-30 Thread keith
keith has uploaded a new patch set (#2). ( 
https://gerrit.osmocom.org/c/osmo-hlr/+/22554 )

Change subject: Fix Coverity Warnings
..

Fix Coverity Warnings

Explicitly check filter_type is not NULL even though the current code
never passed a NULL filter_type unless filter was also NULL.

Remove unreachable code.

Change-Id: Ib2bd9b2d6e9e559e61a895a25235669dae05fdf6
Related: coverity CID#216865
Related: coverity CID#216867
---
M src/db_hlr.c
1 file changed, 3 insertions(+), 7 deletions(-)


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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: Ib2bd9b2d6e9e559e61a895a25235669dae05fdf6
Gerrit-Change-Number: 22554
Gerrit-PatchSet: 2
Gerrit-Owner: keith 
Gerrit-CC: Jenkins Builder
Gerrit-MessageType: newpatchset


Change in libosmocore[master]: ns2: Work around AF_PACKET socket ENOBUFS problems

2021-01-30 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/22555 )


Change subject: ns2: Work around AF_PACKET socket ENOBUFS problems
..

ns2: Work around AF_PACKET socket ENOBUFS problems

AF_PACKET sockets cannot be written-to using select(), as they
will always return "writable" but then still fail with ENOBUFS.

This also means that we cannot use osmo_wqueue() as it assumes
that a writable socket can actually be written to.

As there's no way to figure out when exactly we can again perform
a successful write, we have no other option but to start a timer
and re-try at a later time.

We will scale that timer based on the estimated duration of transmission
for the just-failed PDU on the line rate of a 31TS E1 Line.

Furthermore, with this patch, we stop queueing anything but signaling
traffic (NS-BVCI=0) or Q.933 LMI.  User data (NS-BVCI != 0) will
instead be dropped in order to avoid buffer-bloat.

Change-Id: I4f79a246236c94175ceffa5f3f556c8931c6bc62
Closes: OS#4995
---
M src/gb/gprs_ns2_fr.c
1 file changed, 132 insertions(+), 24 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/55/22555/1

diff --git a/src/gb/gprs_ns2_fr.c b/src/gb/gprs_ns2_fr.c
index 096e150..854eccf 100644
--- a/src/gb/gprs_ns2_fr.c
+++ b/src/gb/gprs_ns2_fr.c
@@ -4,7 +4,7 @@
  * 3GPP TS 08.16 version 8.0.1 Release 1999 / ETSI TS 101 299 V8.0.1 (2002-05)
  * as well as its successor 3GPP TS 48.016 */

-/* (C) 2009-2010,2014,2017 by Harald Welte 
+/* (C) 2009-2021 by Harald Welte 
  * (C) 2020 sysmocom - s.f.m.c. GmbH
  * Author: Alexander Couzens 
  *
@@ -51,9 +51,11 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
+#include 

 #ifdef ENABLE_LIBMNL
 #include 
@@ -72,6 +74,14 @@
 # define IPPROTO_GRE 47
 #endif

+#define E1_LINERATE 2048000
+#define E1_SLOTS_TOTAL 32
+#define E1_SLOTS_USED 31
+/* usable bitrate of the E1 superchannel with 31 of 32 timeslots */
+#define SUPERCHANNEL_LINERATE (E1_LINERATE*E1_SLOTS_USED)/E1_SLOTS_TOTAL
+/* nanoseconds per bit (504) */
+#define BIT_DURATION_NS (10 / SUPERCHANNEL_LINERATE)
+
 struct gre_hdr {
uint16_t flags;
uint16_t ptype;
@@ -88,9 +98,19 @@
 struct priv_bind {
char netif[IFNAMSIZ];
struct osmo_fr_link *link;
-   struct osmo_wqueue wqueue;
int ifindex;
bool if_running;
+   /* backlog queue for AF_PACKET / ENOBUFS handling (see OS#4993) */
+   struct {
+   /* file-descriptor for AF_PACKET socket */
+   struct osmo_fd ofd;
+   /* list of msgb (backlog) */
+   struct llist_head list;
+   /* timer to trigger next attempt of AF_PACKET write */
+   struct osmo_timer_list timer;
+   /* re-try after that many micro-seconds */
+   uint32_t retry_us;
+   } backlog;
 };

 struct priv_vc {
@@ -148,7 +168,7 @@
OSMO_ASSERT(llist_empty(&bind->nsvc));

osmo_fr_link_free(priv->link);
-   osmo_fd_close(&priv->wqueue.bfd);
+   osmo_fd_close(&priv->backlog.ofd);
talloc_free(priv);
 }

@@ -200,15 +220,21 @@
 }

 /* PDU from the network interface towards the fr layer (upwards) */
-static int handle_netif_read(struct osmo_fd *bfd)
+static int fr_netif_ofd_cb(struct osmo_fd *bfd, uint32_t what)
 {
struct gprs_ns2_vc_bind *bind = bfd->data;
struct priv_bind *priv = bind->priv;
-   struct msgb *msg = msgb_alloc(NS_ALLOC_SIZE, "Gb/NS/FR/GRE Rx");
+   struct msgb *msg;
struct sockaddr_ll sll;
socklen_t sll_len = sizeof(sll);
int rc = 0;

+   /* we only handle read here. write to AF_PACKET sockets cannot be 
triggered
+* by select or poll, see OS#4995 */
+   if (!(what & OSMO_FD_READ))
+   return 0;
+
+   msg = msgb_alloc(NS_ALLOC_SIZE, "Gb/NS/FR/GRE Rx");
if (!msg)
return -ENOMEM;

@@ -245,18 +271,35 @@
return rc;
 }

-static int handle_netif_write(struct osmo_fd *ofd, struct msgb *msg)
+static int fr_netif_write_one(struct gprs_ns2_vc_bind *bind, struct msgb *msg)
 {
-   struct gprs_ns2_vc_bind *bind = ofd->data;
+   struct priv_bind *priv = bind->priv;
+   unsigned int len = msgb_length(msg);
int rc;

-   rc = write(ofd->fd, msgb_data(msg), msgb_length(msg));
-   /* write_queue expects a "-errno" type return value in case of failure 
*/
-   if (rc == -1) {
-   LOGBIND(bind, LOGL_ERROR, "error during write to AF_PACKET: 
%s\n", strerror(errno));
-   return -errno;
-   } else
-   return rc;
+   /* estimate the retry time based on the data rate it takes to transmit 
*/
+   priv->backlog.retry_us = (BIT_DURATION_NS * 8 * len) / 1000;
+
+   rc = write(priv->backlog.ofd.fd, msgb_data(msg), len);
+   if (rc == len) {
+   msgb_free(msg);
+   ret

Change in libosmocore[master]: osmo-ns-dummy: Add simple NS traffic generator

2021-01-30 Thread laforge
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/libosmocore/+/22553

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

Change subject: osmo-ns-dummy: Add simple NS traffic generator
..

osmo-ns-dummy: Add simple NS traffic generator

This adds a simple NS traffic generator that can be used to perform
load testing on NS links, particularly those with limited bandwidth
such as frame-relay E1 lines.

Related: OS#4995
Change-Id: Iad3b694c85962dbbc6b4a27a0ed5bc841add464f
---
M utils/Makefile.am
A utils/osmo-ns-dummy-vty.c
M utils/osmo-ns-dummy.c
3 files changed, 312 insertions(+), 1 deletion(-)


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Iad3b694c85962dbbc6b4a27a0ed5bc841add464f
Gerrit-Change-Number: 22553
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset


Change in libosmocore[master]: ns2: encapsulate calls to nsvc->bind->send_vc()

2021-01-30 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/22557 )


Change subject: ns2: encapsulate calls to nsvc->bind->send_vc()
..

ns2: encapsulate calls to nsvc->bind->send_vc()

Don't call the function pointer of the underlying transport
directly, as we many still want to do some common processing,
such as statistics counting (see follow-up patches).

Change-Id: I8d14c7b8d3aacc2bed033072d7934dbd6aab41df
---
M src/gb/gprs_ns2_message.c
1 file changed, 17 insertions(+), 12 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/57/22557/1

diff --git a/src/gb/gprs_ns2_message.c b/src/gb/gprs_ns2_message.c
index 67ee254..d97c2a5 100644
--- a/src/gb/gprs_ns2_message.c
+++ b/src/gb/gprs_ns2_message.c
@@ -166,6 +166,11 @@
 }


+static int ns_vc_tx(struct gprs_ns2_vc *nsvc, struct msgb *msg)
+{
+   return nsvc->bind->send_vc(nsvc, msg);
+}
+
 /* transmit functions */
 static int ns2_tx_simple(struct gprs_ns2_vc *nsvc, uint8_t pdu_type)
 {
@@ -183,7 +188,7 @@

nsh->pdu_type = pdu_type;

-   return nsvc->bind->send_vc(nsvc, msg);
+   return ns_vc_tx(nsvc, msg);
 }

 /*! Transmit a NS-BLOCK on a given NS-VC.
@@ -216,7 +221,7 @@
msgb_tvlv_put(msg, NS_IE_CAUSE, 1, &cause);
msgb_tvlv_put(msg, NS_IE_VCI, 2, (uint8_t *) &nsvci);

-   return nsvc->bind->send_vc(nsvc, msg);
+   return ns_vc_tx(nsvc, msg);
 }

 /*! Transmit a NS-BLOCK-ACK on a given NS-VC.
@@ -245,7 +250,7 @@

msgb_tvlv_put(msg, NS_IE_VCI, 2, (uint8_t *) &nsvci);

-   return nsvc->bind->send_vc(nsvc, msg);
+   return ns_vc_tx(nsvc, msg);
 }

 /*! Transmit a NS-RESET on a given NS-VC.
@@ -278,7 +283,7 @@
msgb_tvlv_put(msg, NS_IE_VCI, 2, (uint8_t *) &nsvci);
msgb_tvlv_put(msg, NS_IE_NSEI, 2, (uint8_t *) &nsei);

-   return nsvc->bind->send_vc(nsvc, msg);
+   return ns_vc_tx(nsvc, msg);
 }

 /*! Transmit a NS-RESET-ACK on a given NS-VC.
@@ -313,7 +318,7 @@
msgb_tvlv_put(msg, NS_IE_VCI, 2, (uint8_t *)&nsvci);
msgb_tvlv_put(msg, NS_IE_NSEI, 2, (uint8_t *)&nsei);

-   return nsvc->bind->send_vc(nsvc, msg);
+   return ns_vc_tx(nsvc, msg);
 }

 /*! Transmit a NS-UNBLOCK on a given NS-VC.
@@ -399,7 +404,7 @@
nsh->data[1] = bvci >> 8;
nsh->data[2] = bvci & 0xff;

-   return nsvc->bind->send_vc(nsvc, msg);
+   return ns_vc_tx(nsvc, msg);
 }

 /*! Transmit a NS-STATUS on a given NS-VC.
@@ -454,7 +459,7 @@
if (cause == NS_CAUSE_BVCI_UNKNOWN)
msgb_tvlv_put(msg, NS_IE_VCI, 2, (uint8_t *)&bvci);

-   return nsvc->bind->send_vc(nsvc, msg);
+   return ns_vc_tx(nsvc, msg);
 }


@@ -514,7 +519,7 @@
  (const uint8_t *)ip6_elems);
}

-   return nsvc->bind->send_vc(nsvc, msg);
+   return ns_vc_tx(nsvc, msg);
 }

 /*! Encode + Transmit a SNS-CONFIG as per Section 9.3.4.
@@ -569,7 +574,7 @@
  (const uint8_t *)ip6_elems);
}

-   return nsvc->bind->send_vc(nsvc, msg);
+   return ns_vc_tx(nsvc, msg);
 }

 /*! Encode + Transmit a SNS-CONFIG-ACK as per Section 9.3.5.
@@ -608,7 +613,7 @@
if (cause)
msgb_tvlv_put(msg, NS_IE_CAUSE, 1, cause);

-   return nsvc->bind->send_vc(nsvc, msg);
+   return ns_vc_tx(nsvc, msg);
 }


@@ -657,7 +662,7 @@
if (ip6_ep_nr >= 0)
msgb_tv16_put(msg, NS_IE_IPv6_EP_NR, ip6_ep_nr);

-   return nsvc->bind->send_vc(nsvc, msg);
+   return ns_vc_tx(nsvc, msg);
 }

 /*! Encode + Transmit a SNS-SIZE-ACK as per Section 9.3.8.
@@ -692,7 +697,7 @@
if (cause)
msgb_tvlv_put(msg, NS_IE_CAUSE, 1, cause);

-   return nsvc->bind->send_vc(nsvc, msg);
+   return ns_vc_tx(nsvc, msg);
 }



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I8d14c7b8d3aacc2bed033072d7934dbd6aab41df
Gerrit-Change-Number: 22557
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


Change in libosmocore[master]: ns2: Increment Rx and Tx byte / packet counters

2021-01-30 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/22558 )


Change subject: ns2: Increment Rx and Tx byte / packet counters
..

ns2: Increment Rx and Tx byte / packet counters

Change-Id: If5e93f69cddbc8962cbbae38c07b504dd9b1ecd1
---
M src/gb/gprs_ns2.c
M src/gb/gprs_ns2_message.c
2 files changed, 6 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/58/22558/1

diff --git a/src/gb/gprs_ns2.c b/src/gb/gprs_ns2.c
index 12cda33..35812e4 100644
--- a/src/gb/gprs_ns2.c
+++ b/src/gb/gprs_ns2.c
@@ -1053,6 +1053,9 @@
log_set_context(LOG_CTX_GB_NSE, nsvc->nse);
log_set_context(LOG_CTX_GB_NSVC, nsvc);

+   rate_ctr_inc(&nsvc->ctrg->ctr[NS_CTR_PKTS_IN]);
+   rate_ctr_add(&nsvc->ctrg->ctr[NS_CTR_BYTES_IN], msg->len);
+
if (msg->len < sizeof(struct gprs_ns_hdr))
return -EINVAL;

diff --git a/src/gb/gprs_ns2_message.c b/src/gb/gprs_ns2_message.c
index d97c2a5..cd49896 100644
--- a/src/gb/gprs_ns2_message.c
+++ b/src/gb/gprs_ns2_message.c
@@ -168,6 +168,9 @@

 static int ns_vc_tx(struct gprs_ns2_vc *nsvc, struct msgb *msg)
 {
+   rate_ctr_inc(&nsvc->ctrg->ctr[NS_CTR_PKTS_OUT]);
+   rate_ctr_add(&nsvc->ctrg->ctr[NS_CTR_BYTES_OUT], msgb_length(msg));
+
return nsvc->bind->send_vc(nsvc, msg);
 }


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: If5e93f69cddbc8962cbbae38c07b504dd9b1ecd1
Gerrit-Change-Number: 22558
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


Change in libosmocore[master]: ns2: Use named array initializers to avoid mistakes

2021-01-30 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/22556 )


Change subject: ns2: Use named array initializers to avoid mistakes
..

ns2: Use named array initializers to avoid mistakes

It's always a bad idea to have an array of descriptions that's indexed
by an enum, without using named initializers.  It's too easy to get
inconsistencies.

Change-Id: Id0ebd2a202a465ca0298f4245f1fb5c495235fc8
---
M src/gb/gprs_ns2.c
M src/gb/gprs_ns2_internal.h
M src/gb/gprs_ns2_message.c
3 files changed, 26 insertions(+), 29 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/56/22556/1

diff --git a/src/gb/gprs_ns2.c b/src/gb/gprs_ns2.c
index be35513..12cda33 100644
--- a/src/gb/gprs_ns2.c
+++ b/src/gb/gprs_ns2.c
@@ -160,18 +160,18 @@
 };
 
 static const struct rate_ctr_desc nsvc_ctr_description[] = {
-   { "packets:in", "Packets at NS Level  ( In)" },
-   { "packets:out","Packets at NS Level  (Out)" },
-   { "bytes:in",   "Bytes at NS Level( In)" },
-   { "bytes:out",  "Bytes at NS Level(Out)" },
-   { "blocked","NS-VC Block count " },
-   { "dead",   "NS-VC gone dead count " },
-   { "replaced",   "NS-VC replaced other count" },
-   { "nsei-chg",   "NS-VC changed NSEI count  " },
-   { "inv-nsvci",  "NS-VCI was invalid count  " },
-   { "inv-nsei",   "NSEI was invalid count" },
-   { "lost:alive", "ALIVE ACK missing count   " },
-   { "lost:reset", "RESET ACK missing count   " },
+   [NS_CTR_PKTS_IN]= { "packets:in",   "Packets at NS Level  ( 
In)" },
+   [NS_CTR_PKTS_OUT]   = { "packets:out",  "Packets at NS Level  
(Out)" },
+   [NS_CTR_BYTES_IN]   = { "bytes:in", "Bytes at NS Level( 
In)" },
+   [NS_CTR_BYTES_OUT]  = { "bytes:out","Bytes at NS Level
(Out)" },
+   [NS_CTR_BLOCKED]= { "blocked",  "NS-VC Block count  
   " },
+   [NS_CTR_DEAD]   = { "dead", "NS-VC gone dead count  
   " },
+   [NS_CTR_REPLACED]   = { "replaced", "NS-VC replaced other 
count" },
+   [NS_CTR_NSEI_CHG]   = { "nsei-chg", "NS-VC changed NSEI 
count  " },
+   [NS_CTR_INV_VCI]= { "inv-nsvci","NS-VCI was invalid 
count  " },
+   [NS_CTR_INV_NSEI]   = { "inv-nsei", "NSEI was invalid count 
   " },
+   [NS_CTR_LOST_ALIVE] = { "lost:alive",   "ALIVE ACK missing 
count   " },
+   [NS_CTR_LOST_RESET] = { "lost:reset",   "RESET ACK missing 
count   " },
 };

 static const struct rate_ctr_group_desc nsvc_ctrg_desc = {
diff --git a/src/gb/gprs_ns2_internal.h b/src/gb/gprs_ns2_internal.h
index 0574cb2..68f28db 100644
--- a/src/gb/gprs_ns2_internal.h
+++ b/src/gb/gprs_ns2_internal.h
@@ -85,6 +85,20 @@
NS2_CS_ERROR,   /*!< Failed to process message */
 };

+enum ns_ctr {
+   NS_CTR_PKTS_IN,
+   NS_CTR_PKTS_OUT,
+   NS_CTR_BYTES_IN,
+   NS_CTR_BYTES_OUT,
+   NS_CTR_BLOCKED,
+   NS_CTR_DEAD,
+   NS_CTR_REPLACED,
+   NS_CTR_NSEI_CHG,
+   NS_CTR_INV_VCI,
+   NS_CTR_INV_NSEI,
+   NS_CTR_LOST_ALIVE,
+   NS_CTR_LOST_RESET,
+};

 #define NSE_S_BLOCKED  0x0001
 #define NSE_S_ALIVE0x0002
diff --git a/src/gb/gprs_ns2_message.c b/src/gb/gprs_ns2_message.c
index c525dd7..67ee254 100644
--- a/src/gb/gprs_ns2_message.c
+++ b/src/gb/gprs_ns2_message.c
@@ -46,23 +46,6 @@
LOGNSVC(nsvc, LOGL_DEBUG, "invalid packet %s with SNS\n", 
reason);  \
} while (0)

-enum ns_ctr {
-   NS_CTR_PKTS_IN,
-   NS_CTR_PKTS_OUT,
-   NS_CTR_BYTES_IN,
-   NS_CTR_BYTES_OUT,
-   NS_CTR_BLOCKED,
-   NS_CTR_DEAD,
-   NS_CTR_REPLACED,
-   NS_CTR_NSEI_CHG,
-   NS_CTR_INV_VCI,
-   NS_CTR_INV_NSEI,
-   NS_CTR_LOST_ALIVE,
-   NS_CTR_LOST_RESET,
-};
-
-
-
 static int ns2_validate_reset(struct gprs_ns2_vc *nsvc, struct msgb *msg, 
struct tlv_parsed *tp, uint8_t *cause)
 {
if (!TLVP_PRES_LEN(tp, NS_IE_CAUSE, 1) ||

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id0ebd2a202a465ca0298f4245f1fb5c495235fc8
Gerrit-Change-Number: 22556
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


Change in libosmocore[master]: ns2: Properly report packet drops in FR code

2021-01-30 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/22559 )


Change subject: ns2: Properly report packet drops in FR code
..

ns2: Properly report packet drops in FR code

When the FR code decides to drop a packet (ENOBUFS from the AF_PACKET
socket for non-signaling packet), let's report that back via the
frame_relay code into the generic NS2 code.

This way the generic NS2 code always knows if a packet was actually
successfully  transmitted, or if it was dropped for some reason.

Change-Id: I4bb517fd04af69dbe6da628b132d57994ab3e5a4
---
M src/gb/gprs_ns2_fr.c
1 file changed, 6 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/59/22559/1

diff --git a/src/gb/gprs_ns2_fr.c b/src/gb/gprs_ns2_fr.c
index 854eccf..ba76c71 100644
--- a/src/gb/gprs_ns2_fr.c
+++ b/src/gb/gprs_ns2_fr.c
@@ -320,7 +320,7 @@
 #define LMI_Q933A_DLCI 0

 /* enqueue to backlog (LMI, signaling) or drop (userdata msg) */
-static void backlog_enqueue_or_free(struct priv_bind *priv, struct msgb *msg)
+static int backlog_enqueue_or_free(struct priv_bind *priv, struct msgb *msg)
 {
uint8_t dlci = msg->data[0];
uint8_t ns_pdu_type;
@@ -333,7 +333,7 @@
/* enqueue Q.933 LMI at head of queue */
llist_add(&msg->list, &priv->backlog.list);
osmo_timer_schedule(&priv->backlog.timer, 0, 
priv->backlog.retry_us);
-   return;
+   return 0;
}
if (msgb_length(msg) < 3)
goto out_free;
@@ -343,11 +343,12 @@
/* enqueue NS signaling traffic at tail of queue */
llist_add_tail(&msg->list, &priv->backlog.list);
osmo_timer_schedule(&priv->backlog.timer, 0, 
priv->backlog.retry_us);
-   return;
+   return 0;
}
 
 out_free:
msgb_free(msg);
+   return -1;
 }

 static void fr_backlog_timer_cb(void *data)
@@ -387,11 +388,11 @@
rc = fr_netif_write_one(bind, msg);
if (rc < 0) {
/* enqueue to backlog in case it fails */
-   backlog_enqueue_or_free(priv, msg);
+   return backlog_enqueue_or_free(priv, msg);
}
} else {
/* enqueue to backlog */
-   backlog_enqueue_or_free(priv, msg);
+   return backlog_enqueue_or_free(priv, msg);
}

return 0;

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I4bb517fd04af69dbe6da628b132d57994ab3e5a4
Gerrit-Change-Number: 22559
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


Change in libosmocore[master]: ns2: count number of dropped packets / bytes on transmit

2021-01-30 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/22560 )


Change subject: ns2: count number of dropped packets / bytes on transmit
..

ns2: count number of dropped packets / bytes on transmit

Differentiate between successfully transmitted packets/bytes,
and pacets/bytes that were dropped (i.e. overflow of net-device)

OsmoNSdummy# show ns nsvc 1001 stats
 NSVCI 01001: UNBLOCKED PERSIST data_weight=1 sig_weight=1 fr)netif: hdlc1 
dlci: 1001
  NSVC Peer Statistics:
   Packets at NS Level  ( In):   36 (0/s 8/m 32/h 0/d)
   Packets at NS Level  (Out):23344 (170/s 20556/m 13119/h 0/d)
   Dropped Packets  (Out):30692 (230/s 27056/m 17221/h 0/d)
   Bytes at NS Level( In):  262 (0/s 24/m 250/h 0/d)
   Bytes at NS Level(Out): 32741312 (238680/s 28849400/m 18391024/h 0/d)
   Dropped Bytes(Out): 43014628 (322920/s 37986624/m 24101344/h 0/d)

Change-Id: If21906ff5379038f7be10cf48c68d1f756dd7c1e
---
M src/gb/gprs_ns2.c
M src/gb/gprs_ns2_internal.h
M src/gb/gprs_ns2_message.c
3 files changed, 17 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/60/22560/1

diff --git a/src/gb/gprs_ns2.c b/src/gb/gprs_ns2.c
index 35812e4..766237d 100644
--- a/src/gb/gprs_ns2.c
+++ b/src/gb/gprs_ns2.c
@@ -162,8 +162,10 @@
 static const struct rate_ctr_desc nsvc_ctr_description[] = {
[NS_CTR_PKTS_IN]= { "packets:in",   "Packets at NS Level  ( 
In)" },
[NS_CTR_PKTS_OUT]   = { "packets:out",  "Packets at NS Level  
(Out)" },
+   [NS_CTR_PKTS_OUT_DROP]  = { "packets:out:drop", "Dropped Packets  
(Out)" },
[NS_CTR_BYTES_IN]   = { "bytes:in", "Bytes at NS Level( 
In)" },
[NS_CTR_BYTES_OUT]  = { "bytes:out","Bytes at NS Level
(Out)" },
+   [NS_CTR_BYTES_OUT_DROP] = { "bytes:out:drop",   "Dropped Bytes
(Out)" },
[NS_CTR_BLOCKED]= { "blocked",  "NS-VC Block count  
   " },
[NS_CTR_DEAD]   = { "dead", "NS-VC gone dead count  
   " },
[NS_CTR_REPLACED]   = { "replaced", "NS-VC replaced other 
count" },
diff --git a/src/gb/gprs_ns2_internal.h b/src/gb/gprs_ns2_internal.h
index 68f28db..98b3f29 100644
--- a/src/gb/gprs_ns2_internal.h
+++ b/src/gb/gprs_ns2_internal.h
@@ -88,8 +88,10 @@
 enum ns_ctr {
NS_CTR_PKTS_IN,
NS_CTR_PKTS_OUT,
+   NS_CTR_PKTS_OUT_DROP,
NS_CTR_BYTES_IN,
NS_CTR_BYTES_OUT,
+   NS_CTR_BYTES_OUT_DROP,
NS_CTR_BLOCKED,
NS_CTR_DEAD,
NS_CTR_REPLACED,
diff --git a/src/gb/gprs_ns2_message.c b/src/gb/gprs_ns2_message.c
index cd49896..bfb8781 100644
--- a/src/gb/gprs_ns2_message.c
+++ b/src/gb/gprs_ns2_message.c
@@ -168,10 +168,20 @@

 static int ns_vc_tx(struct gprs_ns2_vc *nsvc, struct msgb *msg)
 {
-   rate_ctr_inc(&nsvc->ctrg->ctr[NS_CTR_PKTS_OUT]);
-   rate_ctr_add(&nsvc->ctrg->ctr[NS_CTR_BYTES_OUT], msgb_length(msg));
+   unsigned int bytes = msgb_length(msg);
+   int rc;

-   return nsvc->bind->send_vc(nsvc, msg);
+
+   rc = nsvc->bind->send_vc(nsvc, msg);
+   if (rc < 0) {
+   rate_ctr_inc(&nsvc->ctrg->ctr[NS_CTR_PKTS_OUT_DROP]);
+   rate_ctr_add(&nsvc->ctrg->ctr[NS_CTR_BYTES_OUT_DROP], bytes);
+   } else {
+   rate_ctr_inc(&nsvc->ctrg->ctr[NS_CTR_PKTS_OUT]);
+   rate_ctr_add(&nsvc->ctrg->ctr[NS_CTR_BYTES_OUT], bytes);
+   }
+
+   return rc;
 }

 /* transmit functions */

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: If21906ff5379038f7be10cf48c68d1f756dd7c1e
Gerrit-Change-Number: 22560
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


Change in osmo-hlr[master]: Fix Coverity Warnings

2021-01-30 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-hlr/+/22554 )

Change subject: Fix Coverity Warnings
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: Ib2bd9b2d6e9e559e61a895a25235669dae05fdf6
Gerrit-Change-Number: 22554
Gerrit-PatchSet: 2
Gerrit-Owner: keith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Sat, 30 Jan 2021 21:18:09 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-hlr[master]: Fix Coverity Warnings

2021-01-30 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-hlr/+/22554 )

Change subject: Fix Coverity Warnings
..

Fix Coverity Warnings

Explicitly check filter_type is not NULL even though the current code
never passed a NULL filter_type unless filter was also NULL.

Remove unreachable code.

Change-Id: Ib2bd9b2d6e9e559e61a895a25235669dae05fdf6
Related: coverity CID#216865
Related: coverity CID#216867
---
M src/db_hlr.c
1 file changed, 3 insertions(+), 7 deletions(-)

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



diff --git a/src/db_hlr.c b/src/db_hlr.c
index a181c0c..a4c467e 100644
--- a/src/db_hlr.c
+++ b/src/db_hlr.c
@@ -663,7 +663,7 @@
return -EIO;
}

-   if (filter && strcmp(filter_type, "last_lu_seen") != 0) {
+   if (filter_type && filter && strcmp(filter_type, "last_lu_seen") != 0) {
if (strcmp(filter, "on") == 0) {
sprintf(search, "%s", "1");
} else if (strcmp(filter, "off") == 0) {
@@ -704,15 +704,11 @@
db_remove_reset(stmt);
if (rc != SQLITE_DONE) {
*err = sqlite3_errmsg(dbc->db);
-   return -EIO;
-   } else if (rc == SQLITE_DONE) {
-   *err = NULL;
-   return 0;
-   } else {
-   *err = sqlite3_errmsg(dbc->db);
LOGP(DAUC, LOGL_ERROR, "Cannot read subscribers from db:: 
%s\n", *err);
return rc;
}
+   *err = NULL;
+   return 0;
 }

 /*! Retrieve subscriber data from the HLR database.

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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: Ib2bd9b2d6e9e559e61a895a25235669dae05fdf6
Gerrit-Change-Number: 22554
Gerrit-PatchSet: 2
Gerrit-Owner: keith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in libosmocore[master]: ns2: Use proper return value from write_queue callback function

2021-01-30 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/22551 )

Change subject: ns2: Use proper return value from write_queue callback function
..


Patch Set 1:

note this will be replaced in a follow-up commit anyway.


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I93c858facfe7e1c533df8dccc4502a574686bc8a
Gerrit-Change-Number: 22551
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: daniel 
Gerrit-CC: lynxis lazus 
Gerrit-Comment-Date: Sat, 30 Jan 2021 21:19:02 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in libosmocore[master]: ns2: Log ERROR if we cannot transmit a packet due to ENOBUFS

2021-01-30 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/22552 )

Change subject: ns2: Log ERROR if we cannot transmit a packet due to ENOBUFS
..


Patch Set 1:

note this will be removed in a follow-up commit anyway


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I2ba64e96c60e23d2e6c8ecdcab0b52b3833f092c
Gerrit-Change-Number: 22552
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Comment-Date: Sat, 30 Jan 2021 21:19:21 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in libosmocore[master]: ns2: Implement more rate counters

2021-01-30 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/22561 )


Change subject: ns2: Implement more rate counters
..

ns2: Implement more rate counters

The counters had all been lost in the ns -> ns2 configuration,
let's try to implement some more of them: LOST_ALIVE, BLOCKED,
LOST_RESET.

Change-Id: I75d8637bd142722fdf9a162a2369aa9cdc980a57
---
M src/gb/gprs_ns2_vc_fsm.c
1 file changed, 5 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/61/22561/1

diff --git a/src/gb/gprs_ns2_vc_fsm.c b/src/gb/gprs_ns2_vc_fsm.c
index 457a41f..e69f327 100644
--- a/src/gb/gprs_ns2_vc_fsm.c
+++ b/src/gb/gprs_ns2_vc_fsm.c
@@ -204,6 +204,7 @@
osmo_timer_schedule(&priv->alive.timer, 
nsi->timeout[NS_TOUT_TNS_ALIVE], 0);
break;
case NS_TOUT_TNS_ALIVE:
+   rate_ctr_inc(&priv->nsvc->ctrg->ctr[NS_CTR_LOST_ALIVE]);
priv->alive.N++;

if (priv->alive.N <= nsi->timeout[NS_TOUT_TNS_ALIVE_RETRIES]) {
@@ -296,8 +297,10 @@
 {
struct gprs_ns2_vc_priv *priv = fi->priv;

-   if (old_state != GPRS_NS2_ST_BLOCKED)
+   if (old_state != GPRS_NS2_ST_BLOCKED) {
priv->N = 0;
+   rate_ctr_inc(&priv->nsvc->ctrg->ctr[NS_CTR_BLOCKED]);
+   }

if (priv->om_blocked) {
/* we are already blocked after a RESET */
@@ -480,6 +483,7 @@
switch (fi->state) {
case GPRS_NS2_ST_RESET:
if (priv->initiate_reset) {
+   rate_ctr_inc(&priv->nsvc->ctrg->ctr[NS_CTR_LOST_RESET]);
priv->N++;
if (priv->N <= nsi->timeout[NS_TOUT_TNS_RESET_RETRIES]) 
{
osmo_fsm_inst_state_chg(fi, GPRS_NS2_ST_RESET, 
nsi->timeout[NS_TOUT_TNS_RESET], 0);

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I75d8637bd142722fdf9a162a2369aa9cdc980a57
Gerrit-Change-Number: 22561
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


Change in libosmocore[master]: ns2: remove "invalid NSEI" and "invalid NS-VCI" counters

2021-01-30 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/22563 )


Change subject: ns2: remove "invalid NSEI" and "invalid NS-VCI" counters
..

ns2: remove "invalid NSEI" and "invalid NS-VCI" counters

Those counters don't make sense as per-NSVC counters.  They would
need to be introduced as per-NSE counters, if so desired.

Change-Id: Iadb4baee6d459e2db7b16a64a213164572774a2e
---
M src/gb/gprs_ns2.c
M src/gb/gprs_ns2_internal.h
2 files changed, 0 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/63/22563/1

diff --git a/src/gb/gprs_ns2.c b/src/gb/gprs_ns2.c
index f1d4da9..511c4e7 100644
--- a/src/gb/gprs_ns2.c
+++ b/src/gb/gprs_ns2.c
@@ -171,8 +171,6 @@
[NS_CTR_DEAD]   = { "dead", "NS-VC gone dead count  
   " },
[NS_CTR_REPLACED]   = { "replaced", "NS-VC replaced other 
count" },
[NS_CTR_NSEI_CHG]   = { "nsei-chg", "NS-VC changed NSEI 
count  " },
-   [NS_CTR_INV_VCI]= { "inv-nsvci","NS-VCI was invalid 
count  " },
-   [NS_CTR_INV_NSEI]   = { "inv-nsei", "NSEI was invalid count 
   " },
[NS_CTR_LOST_ALIVE] = { "lost:alive",   "ALIVE ACK missing 
count   " },
[NS_CTR_LOST_RESET] = { "lost:reset",   "RESET ACK missing 
count   " },
 };
diff --git a/src/gb/gprs_ns2_internal.h b/src/gb/gprs_ns2_internal.h
index e149767..0b264b6 100644
--- a/src/gb/gprs_ns2_internal.h
+++ b/src/gb/gprs_ns2_internal.h
@@ -97,8 +97,6 @@
NS_CTR_DEAD,
NS_CTR_REPLACED,
NS_CTR_NSEI_CHG,
-   NS_CTR_INV_VCI,
-   NS_CTR_INV_NSEI,
NS_CTR_LOST_ALIVE,
NS_CTR_LOST_RESET,
 };

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Iadb4baee6d459e2db7b16a64a213164572774a2e
Gerrit-Change-Number: 22563
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


Change in libosmocore[master]: ns2: Add a rate_ctr for each NS-UNBLOCK

2021-01-30 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/22562 )


Change subject: ns2: Add a rate_ctr for each NS-UNBLOCK
..

ns2: Add a rate_ctr for each NS-UNBLOCK

We have one for BLOCK, so let's also add one for UNBLOCK.

Change-Id: I693109b7bc4d72b6803b40aae15327389aa37c69
---
M src/gb/gprs_ns2.c
M src/gb/gprs_ns2_internal.h
M src/gb/gprs_ns2_vc_fsm.c
3 files changed, 5 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/62/22562/1

diff --git a/src/gb/gprs_ns2.c b/src/gb/gprs_ns2.c
index 766237d..f1d4da9 100644
--- a/src/gb/gprs_ns2.c
+++ b/src/gb/gprs_ns2.c
@@ -167,6 +167,7 @@
[NS_CTR_BYTES_OUT]  = { "bytes:out","Bytes at NS Level
(Out)" },
[NS_CTR_BYTES_OUT_DROP] = { "bytes:out:drop",   "Dropped Bytes
(Out)" },
[NS_CTR_BLOCKED]= { "blocked",  "NS-VC Block count  
   " },
+   [NS_CTR_UNBLOCKED]  = { "unblocked","NS-VC Unblock count
   " },
[NS_CTR_DEAD]   = { "dead", "NS-VC gone dead count  
   " },
[NS_CTR_REPLACED]   = { "replaced", "NS-VC replaced other 
count" },
[NS_CTR_NSEI_CHG]   = { "nsei-chg", "NS-VC changed NSEI 
count  " },
diff --git a/src/gb/gprs_ns2_internal.h b/src/gb/gprs_ns2_internal.h
index 98b3f29..e149767 100644
--- a/src/gb/gprs_ns2_internal.h
+++ b/src/gb/gprs_ns2_internal.h
@@ -93,6 +93,7 @@
NS_CTR_BYTES_OUT,
NS_CTR_BYTES_OUT_DROP,
NS_CTR_BLOCKED,
+   NS_CTR_UNBLOCKED,
NS_CTR_DEAD,
NS_CTR_REPLACED,
NS_CTR_NSEI_CHG,
diff --git a/src/gb/gprs_ns2_vc_fsm.c b/src/gb/gprs_ns2_vc_fsm.c
index e69f327..839bf6f 100644
--- a/src/gb/gprs_ns2_vc_fsm.c
+++ b/src/gb/gprs_ns2_vc_fsm.c
@@ -373,6 +373,9 @@
struct gprs_ns2_vc *nsvc = priv->nsvc;
struct gprs_ns2_nse *nse = nsvc->nse;

+   if (old_state != GPRS_NS2_ST_UNBLOCKED)
+   rate_ctr_inc(&nsvc->ctrg->ctr[NS_CTR_UNBLOCKED]);
+
priv->accept_unitdata = true;
ns2_nse_notify_unblocked(nsvc, true);
ns2_prim_status_ind(nse, nsvc, 0, GPRS_NS2_AFF_CAUSE_VC_RECOVERY);

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I693109b7bc4d72b6803b40aae15327389aa37c69
Gerrit-Change-Number: 22562
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


Change in osmo-hlr[master]: db_hlr: db_subscrs_get(): fix NULL-pointer dereference

2021-01-30 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-hlr/+/22564 )


Change subject: db_hlr: db_subscrs_get(): fix NULL-pointer dereference
..

db_hlr: db_subscrs_get(): fix NULL-pointer dereference

Change-Id: I346dc66c2f88b1f3504b8be60f9608e69ed40332
Fixes: CID#216867
---
M src/db_hlr.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/64/22564/1

diff --git a/src/db_hlr.c b/src/db_hlr.c
index a181c0c..2bcdeaa 100644
--- a/src/db_hlr.c
+++ b/src/db_hlr.c
@@ -663,7 +663,7 @@
return -EIO;
}

-   if (filter && strcmp(filter_type, "last_lu_seen") != 0) {
+   if (filter && filter_type && strcmp(filter_type, "last_lu_seen") != 0) {
if (strcmp(filter, "on") == 0) {
sprintf(search, "%s", "1");
} else if (strcmp(filter, "off") == 0) {

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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: I346dc66c2f88b1f3504b8be60f9608e69ed40332
Gerrit-Change-Number: 22564
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


Change in osmo-hlr[master]: db_hlr: db_subscrs_get(): fix unreachable code

2021-01-30 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-hlr/+/22565 )


Change subject: db_hlr: db_subscrs_get(): fix unreachable code
..

db_hlr: db_subscrs_get(): fix unreachable code

Change-Id: Iddf94f130365c2acc97f91908e0b705672fd5d81
Fixes: CID#216865
---
M src/db_hlr.c
1 file changed, 3 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/65/22565/1

diff --git a/src/db_hlr.c b/src/db_hlr.c
index 2bcdeaa..8b0450e 100644
--- a/src/db_hlr.c
+++ b/src/db_hlr.c
@@ -704,15 +704,12 @@
db_remove_reset(stmt);
if (rc != SQLITE_DONE) {
*err = sqlite3_errmsg(dbc->db);
-   return -EIO;
-   } else if (rc == SQLITE_DONE) {
-   *err = NULL;
-   return 0;
-   } else {
-   *err = sqlite3_errmsg(dbc->db);
LOGP(DAUC, LOGL_ERROR, "Cannot read subscribers from db:: 
%s\n", *err);
return rc;
}
+
+   *err = NULL;
+   return 0;
 }

 /*! Retrieve subscriber data from the HLR database.

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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: Iddf94f130365c2acc97f91908e0b705672fd5d81
Gerrit-Change-Number: 22565
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


Change in osmo-hlr[master]: db_hlr: db_subscrs_get(): fix unreachable code

2021-01-30 Thread fixeria
fixeria has abandoned this change. ( 
https://gerrit.osmocom.org/c/osmo-hlr/+/22565 )

Change subject: db_hlr: db_subscrs_get(): fix unreachable code
..


Abandoned

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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: Iddf94f130365c2acc97f91908e0b705672fd5d81
Gerrit-Change-Number: 22565
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-CC: Jenkins Builder
Gerrit-MessageType: abandon


Change in osmo-hlr[master]: db_hlr: db_subscrs_get(): fix NULL-pointer dereference

2021-01-30 Thread fixeria
fixeria has abandoned this change. ( 
https://gerrit.osmocom.org/c/osmo-hlr/+/22564 )

Change subject: db_hlr: db_subscrs_get(): fix NULL-pointer dereference
..


Abandoned

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

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: I346dc66c2f88b1f3504b8be60f9608e69ed40332
Gerrit-Change-Number: 22564
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: abandon


Build failure of network:osmocom:nightly/libosmocore in Debian_8.0/i586

2021-01-30 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/Debian_8.0/i586

Package network:osmocom:nightly/libosmocore failed to build in Debian_8.0/i586

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

Last lines of build log:
[  205s] make[3]: Entering directory '/usr/src/packages/BUILD/src/sim'
[  205s]   CC   core.lo
[  205s]   CC   reader.lo
[  206s]   CC   class_tables.lo
[  206s]   CC   card_fs_sim.lo
[  206s] card_fs_sim.c:105:1: error: initializer element is not constant
[  206s]  };
[  206s]  ^
[  206s] card_fs_sim.c:105:1: error: (near initialization for 'ts11_11_sw[22]')
[  206s] Makefile:531: recipe for target 'card_fs_sim.lo' failed
[  206s] make[3]: *** [card_fs_sim.lo] Error 1
[  206s] make[3]: Leaving directory '/usr/src/packages/BUILD/src/sim'
[  206s] Makefile:693: recipe for target 'all-recursive' failed
[  206s] make[2]: *** [all-recursive] Error 1
[  206s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  206s] Makefile:471: recipe for target 'all' failed
[  206s] make[1]: *** [all] Error 2
[  206s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  206s] dh_auto_build: make -j1 returned exit code 2
[  206s] debian/rules:15: recipe for target 'build' failed
[  206s] make: *** [build] Error 2
[  206s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  206s] ### VM INTERACTION START ###
[  207s] Powering off.
[  207s] [  199.020095] reboot: Power down
[  207s] ### VM INTERACTION END ###
[  207s] 
[  207s] lamb09 failed "build libosmocore_1.4.0.429.4d400.dsc" at Sun Jan 31 
01:33:56 UTC 2021.
[  207s] 

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


Build failure of network:osmocom:nightly/libosmocore in Debian_8.0/x86_64

2021-01-30 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/Debian_8.0/x86_64

Package network:osmocom:nightly/libosmocore failed to build in Debian_8.0/x86_64

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

Last lines of build log:
[  152s] make[3]: Entering directory '/usr/src/packages/BUILD/src/sim'
[  152s]   CC   core.lo
[  152s]   CC   reader.lo
[  153s]   CC   class_tables.lo
[  153s]   CC   card_fs_sim.lo
[  153s] card_fs_sim.c:105:1: error: initializer element is not constant
[  153s]  };
[  153s]  ^
[  153s] card_fs_sim.c:105:1: error: (near initialization for 'ts11_11_sw[22]')
[  153s] Makefile:531: recipe for target 'card_fs_sim.lo' failed
[  153s] make[3]: *** [card_fs_sim.lo] Error 1
[  153s] make[3]: Leaving directory '/usr/src/packages/BUILD/src/sim'
[  153s] Makefile:693: recipe for target 'all-recursive' failed
[  153s] make[2]: *** [all-recursive] Error 1
[  153s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  153s] Makefile:471: recipe for target 'all' failed
[  153s] make[1]: *** [all] Error 2
[  153s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  153s] dh_auto_build: make -j1 returned exit code 2
[  153s] debian/rules:15: recipe for target 'build' failed
[  153s] make: *** [build] Error 2
[  153s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  153s] ### VM INTERACTION START ###
[  154s] Powering off.
[  154s] [  149.345604] reboot: Power down
[  155s] ### VM INTERACTION END ###
[  155s] 
[  155s] goat11 failed "build libosmocore_1.4.0.429.4d400.dsc" at Sun Jan 31 
01:41:11 UTC 2021.
[  155s] 

-- 
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

2021-01-30 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:
[  113s] [COMPILING apps/dfu/main.c]
[  114s] [COMPILING ./atmel_softpack_libraries/usb/device/dfu/dfu.c]
[  114s] [COMPILING ./atmel_softpack_libraries/usb/device/dfu/dfu_desc.c]
[  114s] [COMPILING ./atmel_softpack_libraries/usb/device/dfu/dfu_driver.c]
[  114s] Memory region Used Size  Region Size  %age Used
[  114s]  rom:   16580 B16 KB101.20%
[  114s]  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
[  114s] /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: 
warning: changing start of section .stack by 4 bytes
[  114s] /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'
[  114s] /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: 
warning: changing start of section .stack by 4 bytes
[  114s] /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: 
warning: changing start of section .stack by 4 bytes
[  114s] /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: 
warning: changing start of section .stack by 4 bytes
[  114s] /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: region 
`rom' overflowed by 196 bytes
[  114s] collect2: error: ld returned 1 exit status
[  114s] %
[  114s] make[2]: *** [Makefile:234: flash] Error 1
[  114s] make[2]: Leaving directory '/usr/src/packages/BUILD/firmware'
[  114s] make[1]: *** [Makefile:13: fw-qmod-dfu] Error 2
[  114s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  114s] dh_auto_build: error: make -j1 returned exit code 2
[  114s] make: *** [debian/rules:16: build] Error 25
[  114s] dpkg-buildpackage: error: debian/rules build subprocess returned exit 
status 2
[  114s] ### VM INTERACTION START ###
[  117s] [  105.568352] sysrq: Power Off
[  117s] [  105.573204] reboot: Power down
[  117s] ### VM INTERACTION END ###
[  117s] 
[  117s] sheep87 failed "build simtrace2_0.7.0.70.657c.dsc" at Sun Jan 31 
02:27:07 UTC 2021.
[  117s] 

-- 
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.04/x86_64

2021-01-30 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:
[  183s] [COMPILING libboard/qmod/source/wwan_perst.c]
[  183s] [COMPILING libboard/qmod/source/card_pres.c]
[  183s] [COMPILING libboard/qmod/source/wwan_led.c]
[  183s] [COMPILING libboard/qmod/source/i2c.c]
[  183s] [COMPILING libboard/qmod/source/board_qmod.c]
[  184s] [COMPILING apps/dfu/main.c]
[  184s] [COMPILING ./atmel_softpack_libraries/usb/device/dfu/dfu.c]
[  184s] [COMPILING ./atmel_softpack_libraries/usb/device/dfu/dfu_desc.c]
[  184s] [COMPILING ./atmel_softpack_libraries/usb/device/dfu/dfu_driver.c]
[  185s] Memory region Used Size  Region Size  %age Used
[  185s]  rom:   16588 B16 KB101.25%
[  185s]  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'
[  185s] /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: region 
`rom' overflowed by 204 bytes
[  185s] collect2: error: ld returned 1 exit status
[  185s] %
[  185s] make[2]: *** [Makefile:234: flash] Error 1
[  185s] make[2]: Leaving directory '/usr/src/packages/BUILD/firmware'
[  185s] make[1]: *** [Makefile:13: fw-qmod-dfu] Error 2
[  185s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  185s] dh_auto_build: error: make -j1 returned exit code 2
[  185s] make: *** [debian/rules:16: build] Error 25
[  185s] dpkg-buildpackage: error: debian/rules build subprocess returned exit 
status 2
[  185s] ### VM INTERACTION START ###
[  188s] [  164.954162] sysrq: Power Off
[  188s] [  164.970678] reboot: Power down
[  188s] ### VM INTERACTION END ###
[  188s] 
[  188s] cloud104 failed "build simtrace2_0.7.0.70.657c.dsc" at Sun Jan 31 
02:28:28 UTC 2021.
[  188s] 

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