[M] Change in osmo-ttcn3-hacks[master]: sgsn: add testcases for SGSN Context Request procedure

2024-04-19 Thread pespin
Attention is currently required from: fixeria, osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36589?usp=email )

Change subject: sgsn: add testcases for SGSN Context Request procedure
..


Patch Set 4: Code-Review+1

(1 comment)

Patchset:

PS3:
> I first misunderstood your requests to remove the `log()` statements and 
> removed printing the unexpe […]
I don't think this has real value once the test is in place, only during 
writing the test. It will just be polluting logs when running entire suites.
But ok, let's merge it.



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36589?usp=email
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: If71de10897a8a9f6612cd46c760cd89c0299ac2c
Gerrit-Change-Number: 36589
Gerrit-PatchSet: 4
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Fri, 19 Apr 2024 11:09:39 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: fixeria 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[M] Change in osmo-ttcn3-hacks[master]: sgsn: add testcases for SGSN Context Request procedure

2024-04-19 Thread pespin
Attention is currently required from: fixeria.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36589?usp=email )

Change subject: sgsn: add testcases for SGSN Context Request procedure
..


Patch Set 3:

(1 comment)

Patchset:

PS3:
Waiting for @vyanits...@sysmocom.de to really apply requested changes, as 
already disccussed over IM. It seems there was something unexpected in the push 
here.



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36589?usp=email
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: If71de10897a8a9f6612cd46c760cd89c0299ac2c
Gerrit-Change-Number: 36589
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Fri, 19 Apr 2024 10:25:02 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in osmo-ci[master]: jobs/ttcn3: run io_uring testsuites on all nodes

2024-04-19 Thread pespin
Attention is currently required from: osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/36602?usp=email )

Change subject: jobs/ttcn3: run io_uring testsuites on all nodes
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I59b9a7c3928281a0557c17629029adcbc5ae7410
Gerrit-Change-Number: 36602
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Fri, 19 Apr 2024 10:19:55 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in libosmocore[master]: osmo_io: Add iofd param to segmentation_cb

2024-04-19 Thread pespin
Attention is currently required from: daniel, fixeria, jolly.

Hello Jenkins Builder, daniel, fixeria, jolly, laforge,

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

https://gerrit.osmocom.org/c/libosmocore/+/36582?usp=email

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

The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder


Change subject: osmo_io: Add iofd param to segmentation_cb
..

osmo_io: Add iofd param to segmentation_cb

See related ticket for full rant and historical facts about this
callback.
Since anyway we are still developing osmo_io stuff and there will be ABI
breaks when releasing new version, let's udpate the callback signature
too.

Related: OS#6437
Change-Id: Ib8d77e30b1ea759ee5ac2a69d704e81ea71e3079
---
M include/osmocom/core/osmo_io.h
M src/core/osmo_io.c
2 files changed, 53 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/82/36582/3
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36582?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ib8d77e30b1ea759ee5ac2a69d704e81ea71e3079
Gerrit-Change-Number: 36582
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: jolly 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: jolly 
Gerrit-Attention: fixeria 
Gerrit-Attention: daniel 
Gerrit-MessageType: newpatchset


[S] Change in osmo-ttcn3-hacks[master]: SIP_Templates: Make tag collisions harder

2024-04-19 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36597?usp=email )

Change subject: SIP_Templates: Make tag collisions harder
..

SIP_Templates: Make tag collisions harder

It was spotted during some test runs that the same tag was assigned to 2
different components. Let's make this way more difficult by adding some
time to it. Asterisk uses longer strings for instance, since 32bits is
the minimum.

Change-Id: Iba26259fd48da1c2558451fe5f7014151d4935c8
---
M asterisk/gen_links.sh
M asterisk/regen_makefile.sh
M library/SIP_Templates.ttcn
M sip/gen_links.sh
M sip/regen_makefile.sh
5 files changed, 23 insertions(+), 2 deletions(-)

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




diff --git a/asterisk/gen_links.sh b/asterisk/gen_links.sh
index 97df3a2..c342e51 100755
--- a/asterisk/gen_links.sh
+++ b/asterisk/gen_links.sh
@@ -7,6 +7,7 @@
 DIR=$BASEDIR/titan.Libraries.TCCUsefulFunctions/src
 FILES="TCCInterface_Functions.ttcn TCCConversion_Functions.ttcn 
TCCConversion.cc TCCInterface.cc TCCInterface_ip.h "
 FILES+="TCCOpenSecurity_Functions.ttcn TCCOpenSecurity.cc 
TCCOpenSecurity_Functions.hh "
+FILES+="TCCDateTime.cc TCCDateTime_Functions.ttcn"
 gen_links $DIR $FILES

 DIR=$BASEDIR/titan.TestPorts.Common_Components.Socket-API/src
diff --git a/asterisk/regen_makefile.sh b/asterisk/regen_makefile.sh
index 1aa18ae..5d5538e 100755
--- a/asterisk/regen_makefile.sh
+++ b/asterisk/regen_makefile.sh
@@ -15,6 +15,7 @@
TCCConversion.cc
TCCInterface.cc
TCCOpenSecurity.cc
+   TCCDateTime.cc
TELNETasp_PT.cc
 "

diff --git a/library/SIP_Templates.ttcn b/library/SIP_Templates.ttcn
index be07196..e115bb7 100644
--- a/library/SIP_Templates.ttcn
+++ b/library/SIP_Templates.ttcn
@@ -3,6 +3,7 @@
 import from SIPmsg_Types all;
 import from TCCConversion_Functions all;
 import from TCCOpenSecurity_Functions all;
+import from TCCDateTime_Functions all;
 import from Native_Functions all;
 import from Osmocom_Types all;
 import from Misc_Helpers all;
@@ -1151,10 +1152,12 @@
req.msgHeader.cSeq.seqNumber := 
f_sip_next_seq_nr(valueof(req.msgHeader.cSeq.seqNumber));
 }
 
-/* Tags shall have at least 32 bit of randomness */
 function f_sip_rand_tag() return charstring {
+   /* Tags shall have at least 32 bit of randomness */
var integer rnd_int := f_rnd_int(4294967296);
-   return hex2str(int2hex(rnd_int, 8));
+   /* Make collisions harder by appending time to the final string: */
+   var integer ts_int := f_time_ms() mod 4294967296;
+   return hex2str(int2hex(rnd_int, 8)) & "-" & hex2str(int2hex(ts_int, 8));
 }

 /* Generate a "branch" tag value.
diff --git a/sip/gen_links.sh b/sip/gen_links.sh
index d12e23c..4c8456c 100755
--- a/sip/gen_links.sh
+++ b/sip/gen_links.sh
@@ -11,6 +11,7 @@
 DIR=$BASEDIR/titan.Libraries.TCCUsefulFunctions/src
 FILES="TCCInterface_Functions.ttcn TCCConversion_Functions.ttcn 
TCCConversion.cc TCCInterface.cc TCCInterface_ip.h "
 FILES+="TCCOpenSecurity_Functions.ttcn TCCOpenSecurity.cc 
TCCOpenSecurity_Functions.hh "
+FILES+="TCCDateTime.cc TCCDateTime_Functions.ttcn"
 gen_links $DIR $FILES

 DIR=$BASEDIR/titan.TestPorts.Common_Components.Socket-API/src
diff --git a/sip/regen_makefile.sh b/sip/regen_makefile.sh
index ecec62b..b737316 100755
--- a/sip/regen_makefile.sh
+++ b/sip/regen_makefile.sh
@@ -18,6 +18,7 @@
TCCConversion.cc
TCCInterface.cc
TCCOpenSecurity.cc
+   TCCDateTime.cc
TELNETasp_PT.cc
UD_PT.cc
 "

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


[S] Change in libosmocore[master]: osmo_io: Add iofd param to segmentation_cb

2024-04-19 Thread pespin
Attention is currently required from: daniel, fixeria, jolly.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/36582?usp=email )

Change subject: osmo_io: Add iofd param to segmentation_cb
..


Patch Set 2: Code-Review-2


--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36582?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ib8d77e30b1ea759ee5ac2a69d704e81ea71e3079
Gerrit-Change-Number: 36582
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: jolly 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: jolly 
Gerrit-Attention: fixeria 
Gerrit-Attention: daniel 
Gerrit-Comment-Date: Fri, 19 Apr 2024 09:28:01 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-ttcn3-hacks[master]: sgsn: TC_sgsn_context_req_in: match PDP Context IE

2024-04-18 Thread pespin
Attention is currently required from: fixeria.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36601?usp=email )

Change subject: sgsn: TC_sgsn_context_req_in: match PDP Context IE
..


Patch Set 3:

(2 comments)

File library/GTPv1C_Templates.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36601/comment/5bde6f36_cfa65846
PS3, Line 473:  lengthf := ?, /* overwritten */
These overwritten stuff doesn't make much sense here, should be dropped.


File sgsn/SGSN_Tests.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36601/comment/64d89e44_b2e05cbc
PS3, Line 3765: pdp_ctx.pdp_typeorg := apars.addr.pdpTypeOrg;
All these should be passed in tr_PDP_Context_GTPC.



-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36601?usp=email
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: I965c0200ea380c55dc0cd8d3f8e5110883ce2646
Gerrit-Change-Number: 36601
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Thu, 18 Apr 2024 22:35:43 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[M] Change in osmo-ttcn3-hacks[master]: sgsn: TC_sgsn_context_req_in: match MM Context & GSN Address IEs

2024-04-18 Thread pespin
Attention is currently required from: fixeria.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36600?usp=email )

Change subject: sgsn: TC_sgsn_context_req_in: match MM Context & GSN Address IEs
..


Patch Set 2: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36600?usp=email
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: Ie68794c309e548279381d044a3e34dcdf405084f
Gerrit-Change-Number: 36600
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Thu, 18 Apr 2024 22:31:12 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-ttcn3-hacks[master]: sgsn: add testcases for SGSN Context Request procedure

2024-04-18 Thread pespin
Attention is currently required from: fixeria, osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36589?usp=email )

Change subject: sgsn: add testcases for SGSN Context Request procedure
..


Patch Set 2:

(2 comments)

File sgsn/SGSN_Tests.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36589/comment/fd99ae9e_6aff6fd3
PS2, Line 3807: log("Rx SGSN Context Request from SGSN: ", 
gtpc_ud.gtpc);
This log is most probably not needed, only polluting output.


https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36589/comment/5090ea49_347399de
PS2, Line 3852: log("Rx SGSN Context ACK from SGSN: ", 
gtpc_ud.gtpc);
same, not needed.



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36589?usp=email
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: If71de10897a8a9f6612cd46c760cd89c0299ac2c
Gerrit-Change-Number: 36589
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Thu, 18 Apr 2024 22:28:31 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in osmo-ttcn3-hacks[master]: library: GTPv1C: fix ts_MM_Context{GSM,UMTS} templates

2024-04-18 Thread pespin
Attention is currently required from: fixeria.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36599?usp=email )

Change subject: library: GTPv1C: fix ts_MM_Context{GSM,UMTS} templates
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36599?usp=email
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: Ic8abb048f7c1fa795ee472820c5b88de0073dc66
Gerrit-Change-Number: 36599
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Thu, 18 Apr 2024 22:24:47 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-ttcn3-hacks[master]: library: GTPv1C: make ts_GTPC_SGSNContextAck more compact

2024-04-18 Thread pespin
Attention is currently required from: fixeria, osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36598?usp=email )

Change subject: library: GTPv1C: make ts_GTPC_SGSNContextAck more compact
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36598?usp=email
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: I9b0c948f295fd73fad79c8d09b45fd992c90a015
Gerrit-Change-Number: 36598
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Thu, 18 Apr 2024 22:24:10 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-ttcn3-hacks[master]: SIP_Templates: Make tag collisions harder

2024-04-18 Thread pespin
Attention is currently required from: pespin.

Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36597?usp=email

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

The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder


Change subject: SIP_Templates: Make tag collisions harder
..

SIP_Templates: Make tag collisions harder

It was spotted during some test runs that the same tag was assigned to 2
different components. Let's make this way more difficult by adding some
time to it. Asterisk uses longer strings for instance, since 32bits is
the minimum.

Change-Id: Iba26259fd48da1c2558451fe5f7014151d4935c8
---
M asterisk/gen_links.sh
M asterisk/regen_makefile.sh
M library/SIP_Templates.ttcn
M sip/gen_links.sh
M sip/regen_makefile.sh
5 files changed, 23 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/97/36597/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36597?usp=email
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: Iba26259fd48da1c2558451fe5f7014151d4935c8
Gerrit-Change-Number: 36597
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


[M] Change in osmo-bsc[master]: cbsp_link.c: Update somo_stream read_cb2 functions to accommodate for...

2024-04-18 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/36576?usp=email )

Change subject: cbsp_link.c: Update somo_stream read_cb2 functions to 
accommodate for new API param
..

cbsp_link.c: Update somo_stream read_cb2 functions to accommodate for new API 
param

libosmo-netif (not yet released) stream_{cli,srv} osmo_io read_cb API was
updated to provide read result status. Hence, now API users
can account for lower layer errors and act properly, like it used to
do with the previous ofd backend.

This commit partially reverts some error code paths removed in
85687bf176e4b9663f2396a27c28b49221c72fa3 when converting code to use
osmo_io osmo_stream backend.

Change-Id: I4cce5cb6ca98bc28a67dd6e927e9cdfd2312851a
Depends: libosmo-netif.git Change-Id I395c75ff1e9904757ce1d767a9ac2f779593c4c8
---
M src/osmo-bsc/cbsp_link.c
1 file changed, 54 insertions(+), 2 deletions(-)

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




diff --git a/src/osmo-bsc/cbsp_link.c b/src/osmo-bsc/cbsp_link.c
index 98f25d3..9e17ef3 100644
--- a/src/osmo-bsc/cbsp_link.c
+++ b/src/osmo-bsc/cbsp_link.c
@@ -62,11 +62,28 @@
return 0;
 }

-static int cbsp_srv_read_cb(struct osmo_stream_srv *conn, struct msgb *msg)
+static int cbsp_srv_read_cb(struct osmo_stream_srv *conn, int res, struct msgb 
*msg)
 {
struct bsc_cbc_link *cbc = osmo_stream_srv_get_data(conn);
struct osmo_cbsp_decoded *decoded;

+   if (res <= 0) {
+   if (res == -EAGAIN || res == -EINTR) {
+   msgb_free(msg);
+   return 0;
+   }
+   /*
+   if (rc == -EPIPE || rc == -ECONNRESET) {
+   // lost connection
+   } else if (rc == 0) {
+   // connection closed
+   } */
+   msgb_free(msg);
+   osmo_stream_srv_destroy(conn);
+   cbc->server.srv = NULL;
+   return -EBADF;
+   }
+
OSMO_ASSERT(msg);
decoded = osmo_cbsp_decode(conn, msg);
if (decoded) {
@@ -148,11 +165,27 @@
return 0;
 }

-static int cbsp_client_read_cb(struct osmo_stream_cli *cli, struct msgb *msg)
+static int cbsp_client_read_cb(struct osmo_stream_cli *cli, int res, struct 
msgb *msg)
 {
struct bsc_cbc_link *cbc = osmo_stream_cli_get_data(cli);
struct osmo_cbsp_decoded *decoded;

+   if (res <= 0) {
+   if (res == -EAGAIN || res == -EINTR) {
+   msgb_free(msg);
+   return 0;
+   }
+   /*
+   if (rc == -EPIPE || rc == -ECONNRESET) {
+   // lost connection
+   } else if (rc == 0) {
+   // connection closed
+   } */
+   msgb_free(msg);
+   osmo_stream_cli_reconnect(cli);
+   return -EBADF;
+   }
+
OSMO_ASSERT(msg);
decoded = osmo_cbsp_decode(cli, msg);
if (decoded) {

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I4cce5cb6ca98bc28a67dd6e927e9cdfd2312851a
Gerrit-Change-Number: 36576
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[M] Change in osmo-bsc[master]: cbsp_link.c: Update somo_stream read_cb2 functions to accommodate for...

2024-04-18 Thread pespin
Attention is currently required from: fixeria, osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/36576?usp=email )

Change subject: cbsp_link.c: Update somo_stream read_cb2 functions to 
accommodate for new API param
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I4cce5cb6ca98bc28a67dd6e927e9cdfd2312851a
Gerrit-Change-Number: 36576
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Thu, 18 Apr 2024 18:05:33 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-bsc[master]: cbsp_link.c: Update somo_stream read_cb2 functions to accommodate for...

2024-04-18 Thread pespin
Attention is currently required from: fixeria, osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/36576?usp=email )

Change subject: cbsp_link.c: Update somo_stream read_cb2 functions to 
accommodate for new API param
..


Patch Set 2:

(1 comment)

Patchset:

PS2:
It seems I somehow forgot to push the new version of the patch here in gerrit. 
I'm merging it now in order to avoid build failures.
Please give it a review and if something's wrong I can fix it.



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I4cce5cb6ca98bc28a67dd6e927e9cdfd2312851a
Gerrit-Change-Number: 36576
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Attention: osmith 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Thu, 18 Apr 2024 18:04:43 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[XL] Change in osmo-ttcn3-hacks[master]: asterisk: Split SIPConnHdlr to its own file

2024-04-18 Thread pespin
Attention is currently required from: fixeria, osmith, pespin.

Hello Jenkins Builder, fixeria, osmith,

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

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36596?usp=email

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

The following approvals got outdated and were removed:
Code-Review+1 by fixeria, Code-Review+1 by osmith, Code-Review+2 by pespin, 
Verified+1 by Jenkins Builder

The change is no longer submittable: Code-Review and Verified are unsatisfied 
now.


Change subject: asterisk: Split SIPConnHdlr to its own file
..

asterisk: Split SIPConnHdlr to its own file

Change-Id: I168920887bfd05c0a1785c5cb7ac485edaef0df2
---
M asterisk/Asterisk_Tests.ttcn
A asterisk/SIP_ConnectionHandler.ttcn
2 files changed, 741 insertions(+), 691 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/96/36596/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36596?usp=email
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: I168920887bfd05c0a1785c5cb7ac485edaef0df2
Gerrit-Change-Number: 36596
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: fixeria 
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


[M] Change in osmo-bsc[master]: cbsp_link.c: Update somo_stream read_cb2 functions to accommodate for...

2024-04-18 Thread pespin
Attention is currently required from: fixeria, osmith, pespin.

Hello Jenkins Builder, fixeria, osmith,

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

https://gerrit.osmocom.org/c/osmo-bsc/+/36576?usp=email

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

The following approvals got outdated and were removed:
Code-Review+1 by fixeria, Code-Review+1 by osmith, Verified-1 by Jenkins Builder


Change subject: cbsp_link.c: Update somo_stream read_cb2 functions to 
accommodate for new API param
..

cbsp_link.c: Update somo_stream read_cb2 functions to accommodate for new API 
param

libosmo-netif (not yet released) stream_{cli,srv} osmo_io read_cb API was
updated to provide read result status. Hence, now API users
can account for lower layer errors and act properly, like it used to
do with the previous ofd backend.

This commit partially reverts some error code paths removed in
85687bf176e4b9663f2396a27c28b49221c72fa3 when converting code to use
osmo_io osmo_stream backend.

Change-Id: I4cce5cb6ca98bc28a67dd6e927e9cdfd2312851a
Depends: libosmo-netif.git Change-Id I395c75ff1e9904757ce1d767a9ac2f779593c4c8
---
M src/osmo-bsc/cbsp_link.c
1 file changed, 54 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/76/36576/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/36576?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I4cce5cb6ca98bc28a67dd6e927e9cdfd2312851a
Gerrit-Change-Number: 36576
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Attention: osmith 
Gerrit-Attention: fixeria 
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


[S] Change in osmo-ttcn3-hacks[master]: SIP_Templates: Make tag collisions harder

2024-04-18 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36597?usp=email )


Change subject: SIP_Templates: Make tag collisions harder
..

SIP_Templates: Make tag collisions harder

It was spotted during some test runs that the same tag was assigned to 2
different components. Let's make this way more difficult by adding some
time to it. Asterisk uses longer strings for instance, since 32bits is
the minimum.

Change-Id: Iba26259fd48da1c2558451fe5f7014151d4935c8
---
M asterisk/SIP_ConnectionHandler.ttcn
M asterisk/gen_links.sh
M asterisk/regen_makefile.sh
M library/SIP_Templates.ttcn
4 files changed, 22 insertions(+), 3 deletions(-)



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

diff --git a/asterisk/SIP_ConnectionHandler.ttcn 
b/asterisk/SIP_ConnectionHandler.ttcn
index 77ebebb..13b5f04 100644
--- a/asterisk/SIP_ConnectionHandler.ttcn
+++ b/asterisk/SIP_ConnectionHandler.ttcn
@@ -704,4 +704,4 @@
[fail_others] as_SIP_fail_req(sip_expect_str);
 }

-}
\ No newline at end of file
+}
diff --git a/asterisk/gen_links.sh b/asterisk/gen_links.sh
index 97df3a2..c342e51 100755
--- a/asterisk/gen_links.sh
+++ b/asterisk/gen_links.sh
@@ -7,6 +7,7 @@
 DIR=$BASEDIR/titan.Libraries.TCCUsefulFunctions/src
 FILES="TCCInterface_Functions.ttcn TCCConversion_Functions.ttcn 
TCCConversion.cc TCCInterface.cc TCCInterface_ip.h "
 FILES+="TCCOpenSecurity_Functions.ttcn TCCOpenSecurity.cc 
TCCOpenSecurity_Functions.hh "
+FILES+="TCCDateTime.cc TCCDateTime_Functions.ttcn"
 gen_links $DIR $FILES

 DIR=$BASEDIR/titan.TestPorts.Common_Components.Socket-API/src
diff --git a/asterisk/regen_makefile.sh b/asterisk/regen_makefile.sh
index 1aa18ae..5d5538e 100755
--- a/asterisk/regen_makefile.sh
+++ b/asterisk/regen_makefile.sh
@@ -15,6 +15,7 @@
TCCConversion.cc
TCCInterface.cc
TCCOpenSecurity.cc
+   TCCDateTime.cc
TELNETasp_PT.cc
 "

diff --git a/library/SIP_Templates.ttcn b/library/SIP_Templates.ttcn
index be07196..e115bb7 100644
--- a/library/SIP_Templates.ttcn
+++ b/library/SIP_Templates.ttcn
@@ -3,6 +3,7 @@
 import from SIPmsg_Types all;
 import from TCCConversion_Functions all;
 import from TCCOpenSecurity_Functions all;
+import from TCCDateTime_Functions all;
 import from Native_Functions all;
 import from Osmocom_Types all;
 import from Misc_Helpers all;
@@ -1151,10 +1152,12 @@
req.msgHeader.cSeq.seqNumber := 
f_sip_next_seq_nr(valueof(req.msgHeader.cSeq.seqNumber));
 }

-/* Tags shall have at least 32 bit of randomness */
 function f_sip_rand_tag() return charstring {
+   /* Tags shall have at least 32 bit of randomness */
var integer rnd_int := f_rnd_int(4294967296);
-   return hex2str(int2hex(rnd_int, 8));
+   /* Make collisions harder by appending time to the final string: */
+   var integer ts_int := f_time_ms() mod 4294967296;
+   return hex2str(int2hex(rnd_int, 8)) & "-" & hex2str(int2hex(ts_int, 8));
 }

 /* Generate a "branch" tag value.

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36597?usp=email
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: Iba26259fd48da1c2558451fe5f7014151d4935c8
Gerrit-Change-Number: 36597
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


[XL] Change in osmo-ttcn3-hacks[master]: asterisk: Split SIPConnHdlr to its own file

2024-04-18 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36596?usp=email )

Change subject: asterisk: Split SIPConnHdlr to its own file
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36596?usp=email
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: I168920887bfd05c0a1785c5cb7ac485edaef0df2
Gerrit-Change-Number: 36596
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Thu, 18 Apr 2024 17:46:40 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in libosmo-sccp[master]: ss7_asp: Update osmo_stream read_cb2 functions to accommodate for new...

2024-04-18 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/36575?usp=email )

Change subject: ss7_asp: Update osmo_stream read_cb2 functions to accommodate 
for new API param
..

ss7_asp: Update osmo_stream read_cb2 functions to accommodate for new API param

libosmo-netif (not yet released) stream_{cli,srv} osmo_io read_cb API was
updated to provide read result status. Hence, now API users (ss7_asp)
can account for lower layer errors and act properly, like it used to
do with the previous ofd backend.

This commit partially reverts some error code paths removed in
9257cd896e255403822bee6f87f5487a92fd3c11 when converting code to use
osmo_io osmo_stream backend.

Change-Id: I579f4101a9e2874e310ff78e4571f38cfe8dfab0
Depends: libosmo-netif.git Change-Id I395c75ff1e9904757ce1d767a9ac2f779593c4c8
---
M src/osmo_ss7_asp.c
M src/ss7_internal.h
2 files changed, 79 insertions(+), 15 deletions(-)

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




diff --git a/src/osmo_ss7_asp.c b/src/osmo_ss7_asp.c
index 1ce159a..9bb4b40 100644
--- a/src/osmo_ss7_asp.c
+++ b/src/osmo_ss7_asp.c
@@ -602,9 +602,9 @@
talloc_free(asp);
 }

-static int xua_cli_read_cb(struct osmo_stream_cli *conn, struct msgb *msg);
-static int ipa_cli_read_cb(struct osmo_stream_cli *conn, struct msgb *msg);
-static int m3ua_tcp_cli_read_cb(struct osmo_stream_cli *conn, struct msgb 
*msg);
+static int xua_cli_read_cb(struct osmo_stream_cli *conn, int res, struct msgb 
*msg);
+static int ipa_cli_read_cb(struct osmo_stream_cli *conn, int res, struct msgb 
*msg);
+static int m3ua_tcp_cli_read_cb(struct osmo_stream_cli *conn, int res, struct 
msgb *msg);
 static int xua_cli_connect_cb(struct osmo_stream_cli *cli);
 static int xua_cli_close_and_reconnect(struct osmo_stream_cli *cli);

@@ -796,10 +796,20 @@
 }

 /* netif code tells us we can read something from the socket */
-int ss7_asp_ipa_srv_conn_rx_cb(struct osmo_stream_srv *conn, struct msgb *msg)
+int ss7_asp_ipa_srv_conn_rx_cb(struct osmo_stream_srv *conn, int res, struct 
msgb *msg)
 {
struct osmo_ss7_asp *asp = osmo_stream_srv_get_data(conn);

+   if (res <= 0) {
+   if (res == -EAGAIN) {
+   msgb_free(msg);
+   return 0;
+   }
+   msgb_free(msg);
+   osmo_stream_srv_destroy(conn);
+   return res;
+   }
+
msg->dst = asp;
rate_ctr_inc2(asp->ctrg, SS7_ASP_CTR_PKT_RX_TOTAL);
/* we simply use the lower 4 bits of the asp_id, which is initialized 
to a pseudo-random value upon
@@ -808,7 +818,7 @@
 }

 /* netif code tells us we can read something from the socket */
-int ss7_asp_xua_srv_conn_rx_cb(struct osmo_stream_srv *conn, struct msgb *msg)
+int ss7_asp_xua_srv_conn_rx_cb(struct osmo_stream_srv *conn, int res, struct 
msgb *msg)
 {
struct osmo_ss7_asp *asp = osmo_stream_srv_get_data(conn);
unsigned int ppid;
@@ -834,7 +844,13 @@
default:
break;
}
-   goto out;
+   msgb_free(msg);
+   return 0;
+   }
+   if (res <= 0) {
+   msgb_free(msg);
+   osmo_stream_srv_destroy(conn);
+   return rc;
}

ppid = msgb_sctp_ppid(msg);
@@ -848,7 +864,6 @@
else
rc = ss7_asp_rx_unknown(asp, ppid, msg);

-out:
msgb_free(msg);
return rc;
 }
@@ -868,12 +883,22 @@
 }

 /* netif code tells us we can read something from the socket */
-int ss7_asp_m3ua_tcp_srv_conn_rx_cb(struct osmo_stream_srv *conn, struct msgb 
*msg)
+int ss7_asp_m3ua_tcp_srv_conn_rx_cb(struct osmo_stream_srv *conn, int res, 
struct msgb *msg)
 {
struct osmo_ss7_asp *asp = osmo_stream_srv_get_data(conn);
const struct xua_common_hdr *hdr;
int rc;

+   if (res <= 0) {
+   if (res == -EAGAIN) {
+   msgb_free(msg);
+   return 0;
+   }
+   msgb_free(msg);
+   osmo_stream_srv_destroy(conn);
+   return res;
+   }
+
msg->dst = asp;
rate_ctr_inc2(asp->ctrg, SS7_ASP_CTR_PKT_RX_TOTAL);

@@ -953,11 +978,21 @@
 }

 /* read call-back for IPA/SCCPlite socket */
-static int ipa_cli_read_cb(struct osmo_stream_cli *conn, struct msgb *msg)
+static int ipa_cli_read_cb(struct osmo_stream_cli *conn, int res, struct msgb 
*msg)
 {
int fd = osmo_stream_cli_get_fd(conn);
struct osmo_ss7_asp *asp = osmo_stream_cli_get_data(conn);

+   if (res <= 0) {
+   if (res == -EAGAIN) {
+   msgb_free(msg);
+   return 0;
+   }
+

[L] Change in osmo-ttcn3-hacks[master]: Asterisk: Initial AMI support

2024-04-18 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36594?usp=email )

Change subject: Asterisk: Initial AMI support
..


Patch Set 2:

(1 comment)

File asterisk/AMI_Functions.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36594/comment/eb4276c1_c703068e
PS2, Line 109: var integer pos := f_strstr(str, ": ", 0);
> Damn, I am late to the party :(
I'll have a look tomorrow, thanks!



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36594?usp=email
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: I2c570e4d04e7ab8c44962cf484e4bbc946209aee
Gerrit-Change-Number: 36594
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: jolly 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Thu, 18 Apr 2024 17:39:14 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


[S] Change in docker-playground[master]: ttcn3-asterisk: Set Asterisk AMI IP address in Asterisk_Tests

2024-04-18 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/36595?usp=email )

Change subject: ttcn3-asterisk: Set Asterisk AMI IP address in Asterisk_Tests
..

ttcn3-asterisk: Set Asterisk AMI IP address in Asterisk_Tests

The Asterisk_tests testsuite recently gained initial AMI support.
Configure it with the proper IP address.

Depends: osmo-ttcn3-hacks.git Change-Id 
I2c570e4d04e7ab8c44962cf484e4bbc946209aee
Change-Id: Ibb6af1cbfb652214b2fdd2a6eb9a4887c9a9cfb0
---
M ttcn3-asterisk-ims-ue-test/Asterisk_Tests.cfg
1 file changed, 14 insertions(+), 0 deletions(-)

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




diff --git a/ttcn3-asterisk-ims-ue-test/Asterisk_Tests.cfg 
b/ttcn3-asterisk-ims-ue-test/Asterisk_Tests.cfg
index c8744bb..a734c22 100644
--- a/ttcn3-asterisk-ims-ue-test/Asterisk_Tests.cfg
+++ b/ttcn3-asterisk-ims-ue-test/Asterisk_Tests.cfg
@@ -5,6 +5,7 @@
 [LOGGING]

 [TESTPORT_PARAMETERS]
+*.AMI.CTRL_HOSTNAME := "172.18.11.10"
 *.SIP.default_local_address := "172.18.11.103"
 *.SIP.local_sip_port := "5060"
 *.SIP.default_dest_address := "172.18.11.10"

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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Ibb6af1cbfb652214b2fdd2a6eb9a4887c9a9cfb0
Gerrit-Change-Number: 36595
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: jolly 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[S] Change in docker-playground[master]: ttcn3-asterisk: Set Asterisk AMI IP address in Asterisk_Tests

2024-04-18 Thread pespin
Attention is currently required from: fixeria, jolly.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/36595?usp=email )

Change subject: ttcn3-asterisk: Set Asterisk AMI IP address in Asterisk_Tests
..


Patch Set 1: Code-Review+2

(1 comment)

Patchset:

PS1:
Merging together with osmo-ttcn3-hacks.git patch which got merged.



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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Ibb6af1cbfb652214b2fdd2a6eb9a4887c9a9cfb0
Gerrit-Change-Number: 36595
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: jolly 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: jolly 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Thu, 18 Apr 2024 13:47:48 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[L] Change in osmo-ttcn3-hacks[master]: Asterisk: Initial AMI support

2024-04-18 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36594?usp=email )

Change subject: Asterisk: Initial AMI support
..

Asterisk: Initial AMI support

Introduce config and functions around TELNETasp_PT to implement an AMI
interface client to interact with Asterisk.

So far only the "Action: Login" case is implemented.

Change-Id: I2c570e4d04e7ab8c44962cf484e4bbc946209aee
---
A asterisk/AMI_Functions.ttcn
M asterisk/Asterisk_Tests.default
M asterisk/Asterisk_Tests.ttcn
M asterisk/gen_links.sh
M asterisk/regen_makefile.sh
5 files changed, 257 insertions(+), 1 deletion(-)

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




diff --git a/asterisk/AMI_Functions.ttcn b/asterisk/AMI_Functions.ttcn
new file mode 100644
index 000..53a7964
--- /dev/null
+++ b/asterisk/AMI_Functions.ttcn
@@ -0,0 +1,212 @@
+/* Asterisk's AMI interface functions in TTCN-3
+ * (C) 2024 by sysmocom - s.f.m.c. GmbH 
+ * Author: Pau Espin Pedrol 
+ * All rights reserved.
+ *
+ * Released under the terms of GNU General Public License, Version 2 or
+ * (at your option) any later version.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+/*
+ * 
https://docs.asterisk.org/Configuration/Interfaces/Asterisk-Manager-Interface-AMI/AMI-v2-Specification/
+ */
+module AMI_Functions {
+
+import from Misc_Helpers all;
+import from TELNETasp_PortType all;
+import from Osmocom_Types all;
+import from TCCConversion_Functions all;
+import from Socket_API_Definitions all;
+
+modulepar {
+   float mp_ami_prompt_timeout := 10.0;
+}
+
+const charstring AMI_FIELD_ACTION := "Action";
+const charstring AMI_FIELD_USERNAME := "Username";
+const charstring AMI_FIELD_SECRET := "Secret";
+const charstring AMI_FIELD_RESPONSE := "Response";
+
+type record AMI_Field {
+   charstring  key,
+   charstring  val
+};
+type set of AMI_Field AMI_Msg;
+
+template (value) AMI_Field
+ts_AMI_Field(template (value) charstring key,
+template (value) charstring val) := {
+   key := key,
+   val := val
+};
+
+template (present) AMI_Field
+tr_AMI_Field(template (present) charstring key := ?,
+template (present) charstring val := ?) := {
+   key := key,
+   val := val
+};
+
+/*
+ * Field Templates:
+ */
+
+template (value) AMI_Field
+ts_AMI_Field_Action(template (value) charstring val) := 
ts_AMI_Field(AMI_FIELD_ACTION, val);
+template (value) AMI_Field
+ts_AMI_Field_Username(template (value) charstring val) := 
ts_AMI_Field(AMI_FIELD_USERNAME, val);
+template (value) AMI_Field
+ts_AMI_Field_Secret(template (value) charstring val) := 
ts_AMI_Field(AMI_FIELD_SECRET, val);
+
+template (present) AMI_Field
+tr_AMI_Field_Action(template (present) charstring val := ?) := 
tr_AMI_Field(AMI_FIELD_ACTION, val);
+template (present) AMI_Field
+tr_AMI_Field_Username(template (present) charstring val := ?) := 
tr_AMI_Field(AMI_FIELD_USERNAME, val);
+template (present) AMI_Field
+tr_AMI_Field_Secret(template (present) charstring val := ?) := 
tr_AMI_Field(AMI_FIELD_SECRET, val);
+template (present) AMI_Field
+tr_AMI_Field_Response(template (present) charstring val := ?) := 
tr_AMI_Field(AMI_FIELD_RESPONSE, val);
+
+
+template (present) AMI_Field
+tr_AMI_Field_ResponseSuccess := tr_AMI_Field(AMI_FIELD_RESPONSE, "Success");
+
+
+/*
+ * Message Templates:
+ */
+
+template (value) AMI_Msg
+ts_AMI_Action_Login(charstring username, charstring secret) := {
+   ts_AMI_Field_Action("Login"),
+   ts_AMI_Field_Username(username),
+   ts_AMI_Field_Secret(secret)
+};
+
+template (present) AMI_Msg
+tr_AMI_Action_Login(template(present) charstring username := ?,
+   template(present) charstring secret := ?) := superset(
+   tr_AMI_Field_Action("Login"),
+   tr_AMI_Field_Username(username),
+   tr_AMI_Field_Secret(secret)
+);
+
+template (present) AMI_Msg
+tr_AMI_Response_Success := superset(
+   tr_AMI_Field_ResponseSuccess
+);
+
+/*
+ * Functions:
+ */
+
+function f_AMI_Field_from_str(charstring str) return AMI_Field {
+   var AMI_Field field;
+   /* "each field is a key value pair delineated by a ':'.
+* A single space MUST follow the ':' and precede the value. "*/
+   var integer pos := f_strstr(str, ": ", 0);
+   if (pos < 0) {
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+   log2str("Failed parsing AMI_Field: ", 
str));
+   }
+   field.key := substr(str, 0, pos);
+   /* skip ": " */
+   pos := pos + 2;
+   field.val := substr(str, pos, lengthof(str) - pos);
+   return field;
+}
+
+function f_AMI_Msg_from_str(charstrin

[L] Change in osmo-ttcn3-hacks[master]: Asterisk: Initial AMI support

2024-04-18 Thread pespin
Attention is currently required from: fixeria, laforge.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36594?usp=email )

Change subject: Asterisk: Initial AMI support
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36594?usp=email
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: I2c570e4d04e7ab8c44962cf484e4bbc946209aee
Gerrit-Change-Number: 36594
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: jolly 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Thu, 18 Apr 2024 13:46:52 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in libosmo-netif[master]: stream_{cli,srv}: Add 'res' param to read_cb2

2024-04-18 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/36574?usp=email )

Change subject: stream_{cli,srv}: Add 'res' param to read_cb2
..

stream_{cli,srv}: Add 'res' param to read_cb2

Notify user about read errors, similar to what is supported in the
earlier ofd cb backend of osmo_stream_cli/srv:
https://osmocom.org/issues/6405#note-15

Related: OS#6405
Fixes: 5fec34a9f20c3b8769373d1b28ae2062e5e2bdd6
Fixes: 0245cf5e07855abea72693272c55b50b5a93aff4
Change-Id: I395c75ff1e9904757ce1d767a9ac2f779593c4c8
---
M examples/ipa-stream-client.c
M examples/ipa-stream-server.c
M examples/stream-client.c
M examples/stream-server.c
M include/osmocom/netif/stream.h
M src/stream_cli.c
M src/stream_srv.c
M tests/stream/stream_test.c
8 files changed, 176 insertions(+), 58 deletions(-)

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




diff --git a/examples/ipa-stream-client.c b/examples/ipa-stream-client.c
index 720fe66..b58370e 100644
--- a/examples/ipa-stream-client.c
+++ b/examples/ipa-stream-client.c
@@ -102,13 +102,19 @@
return 0;
 }

-static int read_cb(struct osmo_stream_cli *conn, struct msgb *msg)
+static int read_cb(struct osmo_stream_cli *conn, int res, struct msgb *msg)
 {
int num;
struct msg_sent *cur, *tmp, *found = NULL;

LOGP(DIPATEST, LOGL_DEBUG, "received message from stream (payload 
len=%d)\n", msgb_length(msg));

+   if (res <= 0) {
+   LOGP(DIPATEST, LOGL_ERROR, "Event with no data! %d\n", res);
+   msgb_free(msg);
+   return 0;
+   }
+
if (osmo_ipa_process_msg(msg) < 0) {
LOGP(DIPATEST, LOGL_ERROR, "bad IPA message\n");
msgb_free(msg);
diff --git a/examples/ipa-stream-server.c b/examples/ipa-stream-server.c
index 5317921..e87eab4 100644
--- a/examples/ipa-stream-server.c
+++ b/examples/ipa-stream-server.c
@@ -47,8 +47,15 @@
exit(EXIT_SUCCESS);
 }

-int read_cb(struct osmo_stream_srv *conn, struct msgb *msg)
+int read_cb(struct osmo_stream_srv *conn, int res, struct msgb *msg)
 {
+   if (res <= 0) {
+   LOGP(DSTREAMTEST, LOGL_ERROR, "cannot receive message (%d)\n", 
res);
+   msgb_free(msg);
+   osmo_stream_srv_destroy(conn);
+   return -EBADF;
+   }
+
LOGP(DSTREAMTEST, LOGL_DEBUG, "received message from stream (payload 
len=%d)\n", msgb_length(msg));

osmo_ipa_msg_push_headers(msg, osmo_ipa_msgb_cb_proto(msg), 
osmo_ipa_msgb_cb_proto_ext(msg));
diff --git a/examples/stream-client.c b/examples/stream-client.c
index cae0153..6d20263 100644
--- a/examples/stream-client.c
+++ b/examples/stream-client.c
@@ -54,10 +54,17 @@
return 0;
 }

-static int read_cb(struct osmo_stream_cli *conn, struct msgb *msg)
+static int read_cb(struct osmo_stream_cli *conn, int res, struct msgb *msg)
 {
LOGP(DSTREAMTEST, LOGL_NOTICE, "receiving message from stream... ");

+   if (res < 0) {
+   LOGPC(DSTREAMTEST, LOGL_ERROR, "cannot receive message (res = 
%d)\n", res);
+   msgb_free(msg);
+   return 0;
+   }
+
+
LOGPC(DSTREAMTEST, LOGL_NOTICE, "got %d bytes: %s\n", msg->len, 
msgb_hexdump(msg));

msgb_free(msg);
diff --git a/examples/stream-server.c b/examples/stream-server.c
index f6332dc..5295c2b 100644
--- a/examples/stream-server.c
+++ b/examples/stream-server.c
@@ -3,6 +3,7 @@
 #include 
 #include 
 #include 
+#include 

 #include 
 #include 
@@ -44,10 +45,20 @@
signal(SIGINT, SIG_DFL);
 }

-int read_cb(struct osmo_stream_srv *conn, struct msgb *msg)
+int read_cb(struct osmo_stream_srv *conn, int res, struct msgb *msg)
 {
LOGP(DSTREAMTEST, LOGL_NOTICE, "receiving message from stream... ");

+   if (res <= 0) {
+   if (res < 0)
+   LOGPC(DSTREAMTEST, LOGL_ERROR, "cannot receive message: 
%s\n", strerror(-res));
+   else
+   LOGPC(DSTREAMTEST, LOGL_ERROR, "client closed 
connection\n");
+   msgb_free(msg);
+   osmo_stream_srv_destroy(conn);
+   return -EBADF;
+   }
+
LOGPC(DSTREAMTEST, LOGL_NOTICE, "got %d bytes: %s\n", msg->len, 
msgb_hexdump(msg));

msgb_free(msg);
diff --git a/include/osmocom/netif/stream.h b/include/osmocom/netif/stream.h
index 398b277..3c4ec7e 100644
--- a/include/osmocom/netif/stream.h
+++ b/include/osmocom/netif/stream.h
@@ -102,7 +102,14 @@

 typedef int (*osmo_stream_srv_read_cb_t)(struct osmo_stream_srv *conn);
 typedef int (*osmo_stream_srv_closed_cb_

[M] Change in libosmo-netif[master]: stream_{cli,srv}: Add 'res' param to read_cb2

2024-04-18 Thread pespin
Attention is currently required from: laforge.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/36574?usp=email )

Change subject: stream_{cli,srv}: Add 'res' param to read_cb2
..


Patch Set 5: Code-Review+2

(1 comment)

Patchset:

PS5:
MSC_Tests also passed fine (216 success, 1 more than  last nightly in jenkins).
I'm merging this one now and I'll retrigger the dependant patches 
gerrit-jenkins job after OBS have built them.



--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/36574?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I395c75ff1e9904757ce1d767a9ac2f779593c4c8
Gerrit-Change-Number: 36574
Gerrit-PatchSet: 5
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: jolly 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Thu, 18 Apr 2024 13:45:58 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[XL] Change in osmo-ttcn3-hacks[master]: asterisk: Split SIPConnHdlr to its own file

2024-04-18 Thread pespin
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36596?usp=email

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


Change subject: asterisk: Split SIPConnHdlr to its own file
..

asterisk: Split SIPConnHdlr to its own file

Change-Id: I168920887bfd05c0a1785c5cb7ac485edaef0df2
---
M asterisk/Asterisk_Tests.ttcn
A asterisk/SIP_ConnectionHandler.ttcn
2 files changed, 741 insertions(+), 691 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/96/36596/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36596?usp=email
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: I168920887bfd05c0a1785c5cb7ac485edaef0df2
Gerrit-Change-Number: 36596
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset


[S] Change in docker-playground[master]: ttcn3-asterisk: Set Asterisk AMI IP address in Asterisk_Tests

2024-04-18 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/docker-playground/+/36595?usp=email )


Change subject: ttcn3-asterisk: Set Asterisk AMI IP address in Asterisk_Tests
..

ttcn3-asterisk: Set Asterisk AMI IP address in Asterisk_Tests

The Asterisk_tests testsuite recently gained initial AMI support.
Configure it with the proper IP address.

Depends: osmo-ttcn3-hacks.git Change-Id 
I2c570e4d04e7ab8c44962cf484e4bbc946209aee
Change-Id: Ibb6af1cbfb652214b2fdd2a6eb9a4887c9a9cfb0
---
M ttcn3-asterisk-ims-ue-test/Asterisk_Tests.cfg
1 file changed, 14 insertions(+), 0 deletions(-)



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

diff --git a/ttcn3-asterisk-ims-ue-test/Asterisk_Tests.cfg 
b/ttcn3-asterisk-ims-ue-test/Asterisk_Tests.cfg
index c8744bb..a734c22 100644
--- a/ttcn3-asterisk-ims-ue-test/Asterisk_Tests.cfg
+++ b/ttcn3-asterisk-ims-ue-test/Asterisk_Tests.cfg
@@ -5,6 +5,7 @@
 [LOGGING]

 [TESTPORT_PARAMETERS]
+*.AMI.CTRL_HOSTNAME := "172.18.11.10"
 *.SIP.default_local_address := "172.18.11.103"
 *.SIP.local_sip_port := "5060"
 *.SIP.default_dest_address := "172.18.11.10"

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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Ibb6af1cbfb652214b2fdd2a6eb9a4887c9a9cfb0
Gerrit-Change-Number: 36595
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


[L] Change in osmo-ttcn3-hacks[master]: Asterisk: Initial AMI support

2024-04-18 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36594?usp=email )


Change subject: Asterisk: Initial AMI support
..

Asterisk: Initial AMI support

Introduce config and functions around TELNETasp_PT to implement an AMI
interface client to interact with Asterisk.

So far only the "Action: Login" case is implemented.

Change-Id: I2c570e4d04e7ab8c44962cf484e4bbc946209aee
---
A asterisk/AMI_Functions.ttcn
M asterisk/Asterisk_Tests.default
M asterisk/Asterisk_Tests.ttcn
M asterisk/gen_links.sh
M asterisk/regen_makefile.sh
5 files changed, 257 insertions(+), 1 deletion(-)



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

diff --git a/asterisk/AMI_Functions.ttcn b/asterisk/AMI_Functions.ttcn
new file mode 100644
index 000..53a7964
--- /dev/null
+++ b/asterisk/AMI_Functions.ttcn
@@ -0,0 +1,212 @@
+/* Asterisk's AMI interface functions in TTCN-3
+ * (C) 2024 by sysmocom - s.f.m.c. GmbH 
+ * Author: Pau Espin Pedrol 
+ * All rights reserved.
+ *
+ * Released under the terms of GNU General Public License, Version 2 or
+ * (at your option) any later version.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+/*
+ * 
https://docs.asterisk.org/Configuration/Interfaces/Asterisk-Manager-Interface-AMI/AMI-v2-Specification/
+ */
+module AMI_Functions {
+
+import from Misc_Helpers all;
+import from TELNETasp_PortType all;
+import from Osmocom_Types all;
+import from TCCConversion_Functions all;
+import from Socket_API_Definitions all;
+
+modulepar {
+   float mp_ami_prompt_timeout := 10.0;
+}
+
+const charstring AMI_FIELD_ACTION := "Action";
+const charstring AMI_FIELD_USERNAME := "Username";
+const charstring AMI_FIELD_SECRET := "Secret";
+const charstring AMI_FIELD_RESPONSE := "Response";
+
+type record AMI_Field {
+   charstring  key,
+   charstring  val
+};
+type set of AMI_Field AMI_Msg;
+
+template (value) AMI_Field
+ts_AMI_Field(template (value) charstring key,
+template (value) charstring val) := {
+   key := key,
+   val := val
+};
+
+template (present) AMI_Field
+tr_AMI_Field(template (present) charstring key := ?,
+template (present) charstring val := ?) := {
+   key := key,
+   val := val
+};
+
+/*
+ * Field Templates:
+ */
+
+template (value) AMI_Field
+ts_AMI_Field_Action(template (value) charstring val) := 
ts_AMI_Field(AMI_FIELD_ACTION, val);
+template (value) AMI_Field
+ts_AMI_Field_Username(template (value) charstring val) := 
ts_AMI_Field(AMI_FIELD_USERNAME, val);
+template (value) AMI_Field
+ts_AMI_Field_Secret(template (value) charstring val) := 
ts_AMI_Field(AMI_FIELD_SECRET, val);
+
+template (present) AMI_Field
+tr_AMI_Field_Action(template (present) charstring val := ?) := 
tr_AMI_Field(AMI_FIELD_ACTION, val);
+template (present) AMI_Field
+tr_AMI_Field_Username(template (present) charstring val := ?) := 
tr_AMI_Field(AMI_FIELD_USERNAME, val);
+template (present) AMI_Field
+tr_AMI_Field_Secret(template (present) charstring val := ?) := 
tr_AMI_Field(AMI_FIELD_SECRET, val);
+template (present) AMI_Field
+tr_AMI_Field_Response(template (present) charstring val := ?) := 
tr_AMI_Field(AMI_FIELD_RESPONSE, val);
+
+
+template (present) AMI_Field
+tr_AMI_Field_ResponseSuccess := tr_AMI_Field(AMI_FIELD_RESPONSE, "Success");
+
+
+/*
+ * Message Templates:
+ */
+
+template (value) AMI_Msg
+ts_AMI_Action_Login(charstring username, charstring secret) := {
+   ts_AMI_Field_Action("Login"),
+   ts_AMI_Field_Username(username),
+   ts_AMI_Field_Secret(secret)
+};
+
+template (present) AMI_Msg
+tr_AMI_Action_Login(template(present) charstring username := ?,
+   template(present) charstring secret := ?) := superset(
+   tr_AMI_Field_Action("Login"),
+   tr_AMI_Field_Username(username),
+   tr_AMI_Field_Secret(secret)
+);
+
+template (present) AMI_Msg
+tr_AMI_Response_Success := superset(
+   tr_AMI_Field_ResponseSuccess
+);
+
+/*
+ * Functions:
+ */
+
+function f_AMI_Field_from_str(charstring str) return AMI_Field {
+   var AMI_Field field;
+   /* "each field is a key value pair delineated by a ':'.
+* A single space MUST follow the ':' and precede the value. "*/
+   var integer pos := f_strstr(str, ": ", 0);
+   if (pos < 0) {
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+   log2str("Failed parsing AMI_Field: ", 
str));
+   }
+   field.key := substr(str, 0, pos);
+   /* skip ": " */
+   pos := pos + 2;
+   field.val := substr(str, pos, lengthof(str) - pos);
+   return field;
+}
+
+function f_AMI_Msg_from_str(charstring str) return AMI_Msg {
+   var AMI_Msg msg := {};
+   var Misc_Helpers.ro_charstring lines := f_str_

[S] Change in docker-playground[master]: ttcn3-hnbgw: Apply latest changes to 'with-pfcp' scenario

2024-04-18 Thread pespin
Attention is currently required from: daniel, neels.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/36590?usp=email )

Change subject: ttcn3-hnbgw: Apply latest changes to 'with-pfcp' scenario
..


Patch Set 2:

(4 comments)

Commit Message:

https://gerrit.osmocom.org/c/docker-playground/+/36590/comment/de6191fe_fe4953a8
PS1, Line 12: Fixes: 6de89a5fb529928ce9b7b3320e0ca2e3e568d458
> > A commit hash should be "Related:", and "Fixes:" is for redmine issues, 
> > right?? […]
Done


Patchset:

PS2:
All tests passed now.


File ttcn3-hnbgw-test/with-pfcp/HNBGW_Tests.cfg:

https://gerrit.osmocom.org/c/docker-playground/+/36590/comment/312975ba_efc2fc74
PS1, Line 120: +
> Thanks, I'll fix it. […]
Done


File ttcn3-hnbgw-test/with-pfcp/osmo-hnbgw.cfg:

https://gerrit.osmocom.org/c/docker-playground/+/36590/comment/efc4f529_ec19e739
PS1, Line 26: +
> Ack
Done



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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Ie02a0754a6ca985e60e08f1f171f532b6cc16264
Gerrit-Change-Number: 36590
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Attention: neels 
Gerrit-Attention: daniel 
Gerrit-Comment-Date: Thu, 18 Apr 2024 10:18:56 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[S] Change in docker-playground[master]: ttcn3-hnbgw: Apply latest changes to 'with-pfcp' scenario

2024-04-18 Thread pespin
Attention is currently required from: daniel, neels, osmith.

Hello Jenkins Builder, daniel, fixeria, neels, osmith,

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

https://gerrit.osmocom.org/c/docker-playground/+/36590?usp=email

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

The following approvals got outdated and were removed:
Code-Review-1 by neels, Verified+1 by Jenkins Builder


Change subject: ttcn3-hnbgw: Apply latest changes to 'with-pfcp' scenario
..

ttcn3-hnbgw: Apply latest changes to 'with-pfcp' scenario

Recent commits applied changes to the default scenario, but forgot to
apply them to the 'with-pfcp' subdir.

Fixes: 6de89a5fb529928ce9b7b3320e0ca2e3e568d458
Fixes: 3736d31fc0314cb5d39c707374eecdcfe33241c9
Fixes: 0bdbcd6815358a7b1c4b0bb4575a585c45a01e57
Fixes: 2c22a96355b8e057dbd85ac1922ae84cc63f8b1e
Fixes: d3711e67103691171d7ed3e224c050e78c1f5bc4
Change-Id: Ie02a0754a6ca985e60e08f1f171f532b6cc16264
---
M ttcn3-hnbgw-test/with-pfcp/HNBGW_Tests.cfg
M ttcn3-hnbgw-test/with-pfcp/osmo-hnbgw.cfg
2 files changed, 35 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/90/36590/2
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/36590?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Ie02a0754a6ca985e60e08f1f171f532b6cc16264
Gerrit-Change-Number: 36590
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Attention: osmith 
Gerrit-Attention: neels 
Gerrit-Attention: daniel 
Gerrit-MessageType: newpatchset


[M] Change in osmo-ttcn3-hacks[master]: Move f_str_split() Osmocom_VTY_Functions.ttcn -> Misc_Helpers.ttcn

2024-04-18 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36593?usp=email )

Change subject: Move f_str_split() Osmocom_VTY_Functions.ttcn -> 
Misc_Helpers.ttcn
..

Move f_str_split() Osmocom_VTY_Functions.ttcn -> Misc_Helpers.ttcn

This is quite a generic string handling function which fits better
in a generic utility file like Misc_Helpers.ttcn.

Change-Id: I54eff3eea60ed0624919baebfe0ff7393414d6b8
---
M library/Misc_Helpers.ttcn
M library/Osmocom_VTY_Functions.ttcn
M upf/UPF_Tests.ttcn
3 files changed, 39 insertions(+), 26 deletions(-)

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




diff --git a/library/Misc_Helpers.ttcn b/library/Misc_Helpers.ttcn
index cbc1e70..fd2e7bb 100644
--- a/library/Misc_Helpers.ttcn
+++ b/library/Misc_Helpers.ttcn
@@ -79,4 +79,24 @@
return count;
 }

+type record of charstring ro_charstring;
+function f_str_split(charstring str, charstring delim := "\n") return 
ro_charstring
+{
+   var integer pos := 0;
+   var ro_charstring parts := {};
+   var integer delim_pos;
+   var integer end := lengthof(str);
+   while (pos < end) {
+   delim_pos := f_strstr(str, delim, pos);
+   if (delim_pos < 0) {
+   delim_pos := end;
+   }
+   if (delim_pos > pos) {
+   parts := parts & { substr(str, pos, delim_pos - pos) };
+   }
+   pos := delim_pos + 1;
+   }
+   return parts;
+}
+
 }
diff --git a/library/Osmocom_VTY_Functions.ttcn 
b/library/Osmocom_VTY_Functions.ttcn
index 6b0883f..b982a8f 100644
--- a/library/Osmocom_VTY_Functions.ttcn
+++ b/library/Osmocom_VTY_Functions.ttcn
@@ -274,26 +274,7 @@
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "talloc count 
mismatch");
 }

-public function f_str_split(charstring str, charstring delim := "\n") return 
ro_charstring
-{
-   var integer pos := 0;
-   var ro_charstring parts := {};
-   var integer delim_pos;
-   var integer end := lengthof(str);
-   while (pos < end) {
-   delim_pos := f_strstr(str, delim, pos);
-   if (delim_pos < 0) {
-   delim_pos := end;
-   }
-   if (delim_pos > pos) {
-   parts := parts & { substr(str, pos, delim_pos - pos) };
-   }
-   pos := delim_pos + 1;
-   }
-   return parts;
-}
-
-public function f_verify_talloc_bytes(TELNETasp_PT pt, ro_charstring 
object_strs, integer expect_bytes := 0,
+public function f_verify_talloc_bytes(TELNETasp_PT pt, 
Misc_Helpers.ro_charstring object_strs, integer expect_bytes := 0,
   integer attempts := 5, float wait_time 
:= 3.0)
 {
var charstring show_cmd := "show talloc-context application brief";
@@ -302,7 +283,7 @@
attempts := attempts - 1;
var charstring ret := f_vty_transceive_ret(pt, show_cmd);

-   var ro_charstring lines := f_str_split(ret);
+   var Misc_Helpers.ro_charstring lines := f_str_split(ret);

var boolean ok := true;
for (var integer i := 0; i < lengthof(object_strs); i := i + 1) 
{
@@ -315,7 +296,7 @@
if (f_strstr(line, object_str) < 0) {
continue;
}
-   var ro_charstring tokens := f_str_split(line, " 
");
+   var Misc_Helpers.ro_charstring tokens := 
f_str_split(line, " ");
if (lengthof(tokens) < 4) {
continue;
}
diff --git a/upf/UPF_Tests.ttcn b/upf/UPF_Tests.ttcn
index 140e81b..cb8c489 100644
--- a/upf/UPF_Tests.ttcn
+++ b/upf/UPF_Tests.ttcn
@@ -125,7 +125,7 @@
if (not f_get_name_val(token, str, name)) {
return false;
}
-   var ro_charstring nrl := f_str_split(token, delim);
+   var Misc_Helpers.ro_charstring nrl := f_str_split(token, delim);
if (lengthof(nrl) != 2) {
return false;
}
@@ -270,7 +270,7 @@

 private function f_vty_get_gtp_actions(TELNETasp_PT vty_pt) return 
GTP_Action_List {
var charstring gtp_str := f_vty_transceive_ret(vty_pt, "show gtp");
-   var ro_charstring lines := f_str_split(gtp_str, "\n");
+   var Misc_Helpers.ro_charstring lines := f_str_split(gtp_str, "\n");
var GTP_Action_List gtps := {};
for (var integer i := 0; i < lengthof(lines); i := i + 1) {
var charstring line := lines[i];
@@ -399,7 +399,7 @@

 private function 

[M] Change in osmo-ttcn3-hacks[master]: Move f_strstr_count() Osmocom_VTY_Functions.ttcn -> Misc_Helpers.ttcn

2024-04-18 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36592?usp=email )

Change subject: Move f_strstr_count() Osmocom_VTY_Functions.ttcn -> 
Misc_Helpers.ttcn
..

Move f_strstr_count() Osmocom_VTY_Functions.ttcn -> Misc_Helpers.ttcn

This is quite a generic string handling function which fits better
in a generic utility file like Misc_Helpers.ttcn.

Change-Id: I105844d2bcab6c24624be1224c1ba78b69d4b44c
---
M ccid/gen_links.sh
M ccid/regen_makefile.sh
M library/Misc_Helpers.ttcn
M library/Osmocom_VTY_Functions.ttcn
M simtrace/gen_links.sh
M simtrace/regen_makefile.sh
6 files changed, 38 insertions(+), 23 deletions(-)

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




diff --git a/ccid/gen_links.sh b/ccid/gen_links.sh
index e53954b..593f624 100755
--- a/ccid/gen_links.sh
+++ b/ccid/gen_links.sh
@@ -4,9 +4,9 @@

 . ../gen_links.sh.inc

-#DIR=$BASEDIR/titan.Libraries.TCCUsefulFunctions/src
-#FILES="TCCInterface_Functions.ttcn TCCConversion_Functions.ttcn 
TCCConversion.cc TCCInterface.cc TCCInterface_ip.h"
-#gen_links $DIR $FILES
+DIR=$BASEDIR/titan.Libraries.TCCUsefulFunctions/src
+FILES="TCCConversion_Functions.ttcn TCCConversion.cc"
+gen_links $DIR $FILES

 DIR=$BASEDIR/titan.TestPorts.USB/src
 FILES="USB_PT.cc USB_PT.hh USB_PortType.ttcn USB_PortTypes.ttcn 
USB_Templates.ttcn USB_Types.ttcn USB_Component.ttcn "
diff --git a/ccid/regen_makefile.sh b/ccid/regen_makefile.sh
index bbb7f33..c91ac12 100755
--- a/ccid/regen_makefile.sh
+++ b/ccid/regen_makefile.sh
@@ -5,6 +5,7 @@
 FILES="
*.ttcn
Native_FunctionDefs.cc
+   TCCConversion.cc
USB_PT.cc
 "

diff --git a/library/Misc_Helpers.ttcn b/library/Misc_Helpers.ttcn
index dda2c2c..cbc1e70 100644
--- a/library/Misc_Helpers.ttcn
+++ b/library/Misc_Helpers.ttcn
@@ -1,6 +1,7 @@
 module Misc_Helpers {
 
 import from Native_Functions all;
+import from TCCConversion_Functions all;

 modulepar {
charstring mp_osmo_repo := "nightly";
@@ -61,4 +62,21 @@
}
 }

+/* Return a count of how many times sub_str occurs in str. */
+function f_strstr_count(in charstring str, in charstring sub_str) return 
integer
+{
+   var integer count := 0;
+   var integer pos := 0;
+
+   while (true) {
+   var integer at := f_strstr(str, sub_str, pos);
+   if (at < 0) {
+   break;
+   }
+   count := count + 1;
+   pos := at + 1;
+   }
+   return count;
+}
+
 }
diff --git a/library/Osmocom_VTY_Functions.ttcn 
b/library/Osmocom_VTY_Functions.ttcn
index 3dd0429..6b0883f 100644
--- a/library/Osmocom_VTY_Functions.ttcn
+++ b/library/Osmocom_VTY_Functions.ttcn
@@ -228,23 +228,6 @@
return "";
 }

-/* Return a count of how many times sub_str occurs in str. */
-function f_strstr_count(in charstring str, in charstring sub_str) return 
integer
-{
-   var integer count := 0;
-   var integer pos := 0;
-
-   while (true) {
-   var integer at := f_strstr(str, sub_str, pos);
-   if (at < 0) {
-   break;
-   }
-   count := count + 1;
-   pos := at + 1;
-   }
-   return count;
-}
-
 private type record of charstring StrList;

 /* Perform a 'show talloc-context' to get a count of the given object_strs 
that are still allocated.
diff --git a/simtrace/gen_links.sh b/simtrace/gen_links.sh
index eef1fea..3bce04d 100755
--- a/simtrace/gen_links.sh
+++ b/simtrace/gen_links.sh
@@ -4,9 +4,9 @@

 . ../gen_links.sh.inc

-#DIR=$BASEDIR/titan.Libraries.TCCUsefulFunctions/src
-#FILES="TCCInterface_Functions.ttcn TCCConversion_Functions.ttcn 
TCCConversion.cc TCCInterface.cc TCCInterface_ip.h"
-#gen_links $DIR $FILES
+DIR=$BASEDIR/titan.Libraries.TCCUsefulFunctions/src
+FILES="TCCConversion_Functions.ttcn TCCConversion.cc"
+gen_links $DIR $FILES

 DIR=$BASEDIR/titan.TestPorts.USB/src
 FILES="USB_PT.cc USB_PT.hh USB_PortType.ttcn USB_PortTypes.ttcn 
USB_Templates.ttcn USB_Types.ttcn USB_Component.ttcn "
diff --git a/simtrace/regen_makefile.sh b/simtrace/regen_makefile.sh
index baecf7d..04c8397 100755
--- a/simtrace/regen_makefile.sh
+++ b/simtrace/regen_makefile.sh
@@ -5,6 +5,7 @@
 FILES="
*.ttcn
Native_FunctionDefs.cc
+   TCCConversion.cc
USB_PT.cc
 "


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36592?usp=email
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: I105844d2bcab6c24624be1224c1ba78b69d4b44c
Gerrit-Change-Number: 36592
Gerrit-PatchSet: 5
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[S] Change in libosmo-netif[master]: tests/stream: Fix missing msgb_free()

2024-04-18 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/36583?usp=email )

Change subject: tests/stream: Fix missing msgb_free()
..

tests/stream: Fix missing msgb_free()

Rework a bit the function to early free the rx msg when it is no longer
needed.

Change-Id: I7e7579175aa6a7c1c22eb3bc147a67f6f62ad6bc
---
M tests/stream/stream_test.c
1 file changed, 22 insertions(+), 4 deletions(-)

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




diff --git a/tests/stream/stream_test.c b/tests/stream/stream_test.c
index e50752b..d73dd1d 100644
--- a/tests/stream/stream_test.c
+++ b/tests/stream/stream_test.c
@@ -572,15 +572,21 @@
struct ipa_head *ih = (struct ipa_head *)msg->l1h;
unsigned char *data;
struct msgb *m;
-   uint8_t *msgt = msg->l2h; /* Octet right after IPA header */
+   uint8_t msgt;
+
LOGSRV(conn, "[%u-srv] Received IPA message from stream (payload len = 
%" PRIu16 ")\n",
   ++msgnum_srv, msgb_length(msg));
LOGSRV(conn, "\tmsg buff data (including stripped headers): %s\n",
   osmo_hexdump((unsigned char *)ih, osmo_ntohs(ih->len) + 
sizeof(*ih)));
LOGSRV(conn, "\tIPA payload: %s\n", osmo_hexdump(ih->data, 
osmo_ntohs(ih->len)));
-   LOGSRV(conn, "\tType: %s\n", IPAC_MSG_TYPES[*msgt]);
+
+   msgt = *msg->l2h; /* Octet right after IPA header */
+   LOGSRV(conn, "\tType: %s\n", IPAC_MSG_TYPES[msgt]);
LOGSRV(conn, "\t(msg dump: %s)\n", osmo_hexdump(msg->l1h, msg->len + 
sizeof(struct ipa_head)));
-   if (*msgt == IPAC_MSGT_ID_RESP) { /*  */
+
+   msgb_free(msg);
+
+   if (msgt == IPAC_MSGT_ID_RESP) { /*  */
LOGSRV(conn, "Send IPAC_MSGT_ID_GET to trigger client to send 
next third\n\n");
m = osmo_ipa_msg_alloc(128);
if (m == NULL) {
@@ -590,7 +596,7 @@
put_ipa_msg(data, m, ipac_msg_idreq_payload);
osmo_ipa_msg_push_headers(m, IPAC_PROTO_IPACCESS, -1);
osmo_stream_srv_send(conn, m);
-   } else if (msgnum_srv == 7 && *msgt == IPAC_MSGT_PONG) {
+   } else if (msgnum_srv == 7 && msgt == IPAC_MSGT_PONG) {
test_segm_ipa_stream_srv_all_msgs_processed = true;
osmo_stream_srv_destroy(conn);
}

--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/36583?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I7e7579175aa6a7c1c22eb3bc147a67f6f62ad6bc
Gerrit-Change-Number: 36583
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[S] Change in osmo-bsc[master]: cbsp_link.c: Update stream_cli read_cb2 functions to accommodate for ...

2024-04-18 Thread pespin
Attention is currently required from: osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/36576?usp=email )

Change subject: cbsp_link.c: Update stream_cli read_cb2 functions to 
accommodate for new API param
..


Patch Set 1:

(1 comment)

File src/osmo-bsc/cbsp_link.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/36576/comment/37a19e47_6b045711
PS1, Line 166:  } */
> maybe add log messages instead of having the commented out code?
I'm basically leaving the code which was there before and got removed when 
moving to osmo_io, but simply commenting it out since it really is a no-op. 
Still I think it's useful keeping it in case someone wants to do more 
fine-grained error handling.

85687bf176e4b9663f2396a27c28b49221c72fa3:

-   /* READ */
-   rc = osmo_cbsp_recv_buffered(cbc, ofd->fd, , >client.msg);
-   if (rc <= 0) {
-   if (rc == -EAGAIN || rc == -EINTR) {
-   /* more data needs to be read */
-   return 0;
-   } else if (rc == -EPIPE || rc == -ECONNRESET) {
-   /* lost connection */
-   } else if (rc == 0) {
-   /* connection closed */
-   }
-   osmo_stream_cli_reconnect(cli);
-   return -EBADF;
-   }



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I4cce5cb6ca98bc28a67dd6e927e9cdfd2312851a
Gerrit-Change-Number: 36576
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Thu, 18 Apr 2024 09:54:24 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith 
Gerrit-MessageType: comment


[M] Change in libosmo-sccp[master]: ss7_asp: Update osmo_stream read_cb2 functions to accommodate for new...

2024-04-18 Thread pespin
Attention is currently required from: osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/36575?usp=email )

Change subject: ss7_asp: Update osmo_stream read_cb2 functions to accommodate 
for new API param
..


Patch Set 6:

(1 comment)

File src/osmo_ss7_asp.c:

https://gerrit.osmocom.org/c/libosmo-sccp/+/36575/comment/e8ab38b5_1a8636d7
PS6, Line 1050: if (res < 0) {
  : xua_cli_close_and_reconnect(conn);
  : goto out;
  : } else if (res == 0) {
  : xua_cli_close_and_reconnect(conn);
  :
  : goto out;
  : }
> could be changed to "if (res <= 0)"
Yes I know but I wanted to keep the two conditions separated in general, one 
for regular socket close and other one for errors. Makes it easier to extend 
later if neeeded.



--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/36575?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I579f4101a9e2874e310ff78e4571f38cfe8dfab0
Gerrit-Change-Number: 36575
Gerrit-PatchSet: 6
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Thu, 18 Apr 2024 09:51:31 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith 
Gerrit-MessageType: comment


[S] Change in osmo-ttcn3-hacks[master]: .gitignore: Add .vscode/ directory

2024-04-18 Thread pespin
pespin has abandoned this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36591?usp=email )

Change subject: .gitignore: Add .vscode/ directory
..


Abandoned
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36591?usp=email
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: I8a5c5ca50591a0f531258dd59df462ec2ff5f81c
Gerrit-Change-Number: 36591
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-MessageType: abandon


[S] Change in osmo-ttcn3-hacks[master]: .gitignore: Add .vscode/ directory

2024-04-18 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36591?usp=email )

Change subject: .gitignore: Add .vscode/ directory
..


Patch Set 1:

(1 comment)

Patchset:

PS1:
Fine, abandoning.



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36591?usp=email
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: I8a5c5ca50591a0f531258dd59df462ec2ff5f81c
Gerrit-Change-Number: 36591
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Thu, 18 Apr 2024 09:06:44 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in docker-playground[master]: ttcn3-hnbgw: Apply latest changes to 'with-pfcp' scenario

2024-04-18 Thread pespin
Attention is currently required from: daniel, neels, osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/36590?usp=email )

Change subject: ttcn3-hnbgw: Apply latest changes to 'with-pfcp' scenario
..


Patch Set 1:

(3 comments)

Commit Message:

https://gerrit.osmocom.org/c/docker-playground/+/36590/comment/ff16ef31_956a0211
PS1, Line 12: Fixes: 6de89a5fb529928ce9b7b3320e0ca2e3e568d458
> A commit hash should be "Related:", and "Fixes:" is for redmine issues, 
> right??

I think I already shared with you previously that this is common pattern in 
projects like linux kernel, which is useful to track with scripts follow-up 
patches which fix bugs in patches one want to cherry-pick.
So I see no problem with it and I actually invite others to do the same.


File ttcn3-hnbgw-test/with-pfcp/HNBGW_Tests.cfg:

https://gerrit.osmocom.org/c/docker-playground/+/36590/comment/390a3f2a_cfdfb6ac
PS1, Line 120: +
Thanks, I'll fix it.

> IMHO we should have one fixed config in osmo-hnbgw.cfg, or only ttcn3 code 
> that adjusts config via VTY.

Yeah probably, but out of the scope for this patch, this needs quite a lot of 
work, I'm just fixing the running tests because it showed up during weekly 
meeting this week.

In this case the "duplication" is simply that it needs to match what osmo-hnbgw 
was cofnigured with, not really "sync" between TTCN3 config files.

> this "+" seems to be a copy paste bug -- let me guess, you haven't actually 
> tested this patch..

Yeah I didn't test it, sorry for that, I just wrote the patch while running 
other ttcn3 testsuites validating the osmo_io fixes I submitted.
I'll give them a run today.


File ttcn3-hnbgw-test/with-pfcp/osmo-hnbgw.cfg:

https://gerrit.osmocom.org/c/docker-playground/+/36590/comment/95d9d823_ff9add2c
PS1, Line 26: +
> "+" artifact
Ack



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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Ie02a0754a6ca985e60e08f1f171f532b6cc16264
Gerrit-Change-Number: 36590
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Attention: osmith 
Gerrit-Attention: neels 
Gerrit-Attention: daniel 
Gerrit-Comment-Date: Thu, 18 Apr 2024 09:03:46 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels 
Gerrit-MessageType: comment


[M] Change in libosmo-netif[master]: stream_{cli,srv}: Add 'res' param to read_cb2

2024-04-18 Thread pespin
Attention is currently required from: fixeria, jolly, laforge, osmith.

Hello Jenkins Builder, fixeria, jolly, laforge, osmith,

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

https://gerrit.osmocom.org/c/libosmo-netif/+/36574?usp=email

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

The following approvals got outdated and were removed:
Code-Review+1 by fixeria, Code-Review+1 by osmith, Verified+1 by Jenkins Builder


Change subject: stream_{cli,srv}: Add 'res' param to read_cb2
..

stream_{cli,srv}: Add 'res' param to read_cb2

Notify user about read errors, similar to what is supported in the
earlier ofd cb backend of osmo_stream_cli/srv:
https://osmocom.org/issues/6405#note-15

Related: OS#6405
Fixes: 5fec34a9f20c3b8769373d1b28ae2062e5e2bdd6
Fixes: 0245cf5e07855abea72693272c55b50b5a93aff4
Change-Id: I395c75ff1e9904757ce1d767a9ac2f779593c4c8
---
M examples/ipa-stream-client.c
M examples/ipa-stream-server.c
M examples/stream-client.c
M examples/stream-server.c
M include/osmocom/netif/stream.h
M src/stream_cli.c
M src/stream_srv.c
M tests/stream/stream_test.c
8 files changed, 176 insertions(+), 58 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/74/36574/5
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/36574?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I395c75ff1e9904757ce1d767a9ac2f779593c4c8
Gerrit-Change-Number: 36574
Gerrit-PatchSet: 5
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: jolly 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: jolly 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-MessageType: newpatchset


[S] Change in libosmo-netif[master]: tests/stream: Fix missing msgb_free()

2024-04-18 Thread pespin
Attention is currently required from: fixeria, osmith.

Hello Jenkins Builder, fixeria, osmith,

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

https://gerrit.osmocom.org/c/libosmo-netif/+/36583?usp=email

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

The following approvals got outdated and were removed:
Code-Review+1 by fixeria, Code-Review+1 by osmith, Verified+1 by Jenkins Builder


Change subject: tests/stream: Fix missing msgb_free()
..

tests/stream: Fix missing msgb_free()

Rework a bit the function to early free the rx msg when it is no longer
needed.

Change-Id: I7e7579175aa6a7c1c22eb3bc147a67f6f62ad6bc
---
M tests/stream/stream_test.c
1 file changed, 22 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/83/36583/2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/36583?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I7e7579175aa6a7c1c22eb3bc147a67f6f62ad6bc
Gerrit-Change-Number: 36583
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Attention: osmith 
Gerrit-Attention: fixeria 
Gerrit-MessageType: newpatchset


[M] Change in libosmo-netif[master]: stream_{cli,srv}: Add 'res' param to read_cb2

2024-04-18 Thread pespin
Attention is currently required from: jolly, laforge, osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/36574?usp=email )

Change subject: stream_{cli,srv}: Add 'res' param to read_cb2
..


Patch Set 4:

(1 comment)

File include/osmocom/netif/stream.h:

https://gerrit.osmocom.org/c/libosmo-netif/+/36574/comment/577dacb6_d221ee2c
PS4, Line 107: srv
> conn
Ack



--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/36574?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I395c75ff1e9904757ce1d767a9ac2f779593c4c8
Gerrit-Change-Number: 36574
Gerrit-PatchSet: 4
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: jolly 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: jolly 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Thu, 18 Apr 2024 08:45:47 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith 
Gerrit-MessageType: comment


[S] Change in libosmo-netif[master]: tests/stream: Fix missing msgb_free()

2024-04-18 Thread pespin
Attention is currently required from: osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/36583?usp=email )

Change subject: tests/stream: Fix missing msgb_free()
..


Patch Set 1:

(1 comment)

File tests/stream/stream_test.c:

https://gerrit.osmocom.org/c/libosmo-netif/+/36583/comment/3d2c7684_5e80345a
PS1, Line 598:  return 0;
> how does it get freed in the other code paths? (if (*msgt == 
> IPAC_MSGT_ID_RESP) and when both if and […]
Oh I thought it was actualy forwaded with "osmo_stream_srv_send(conn, m);", but 
now that you mention it, another msgb is actually allocated, so the "msg" is 
leaked.
Good catch!
I'll change it.



--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/36583?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I7e7579175aa6a7c1c22eb3bc147a67f6f62ad6bc
Gerrit-Change-Number: 36583
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Thu, 18 Apr 2024 08:45:29 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith 
Gerrit-MessageType: comment


[M] Change in libosmo-netif[master]: stream: Define types for each API callback

2024-04-18 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/36581?usp=email )

Change subject: stream: Define types for each API callback
..

stream: Define types for each API callback

The amount and complexity of callbacks is increasing over time.
Use typedefs to define each of them so that callbacks:
- Are easier to identify (which types is used where)
- Are easier to document (have a 1st class place to write doxygen
  documentation)

Change-Id: Ib0c4a9713fa4c755e457b8c2cbde6a7724d36e28
---
M include/osmocom/netif/stream.h
M src/stream_cli.c
M src/stream_srv.c
3 files changed, 65 insertions(+), 33 deletions(-)

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




diff --git a/include/osmocom/netif/stream.h b/include/osmocom/netif/stream.h
index 61bc1ad..398b277 100644
--- a/include/osmocom/netif/stream.h
+++ b/include/osmocom/netif/stream.h
@@ -62,6 +62,8 @@
 /*! \brief Osmocom Stream Server Link: A server socket listening/accepting */
 struct osmo_stream_srv_link;

+typedef int (*osmo_stream_srv_link_accept_cb_t)(struct osmo_stream_srv_link 
*link, int fd);
+
 struct osmo_stream_srv_link *osmo_stream_srv_link_create(void *ctx);
 void osmo_stream_srv_link_destroy(struct osmo_stream_srv_link *link);

@@ -74,7 +76,7 @@
 void osmo_stream_srv_link_set_proto(struct osmo_stream_srv_link *link, 
uint16_t proto);
 int osmo_stream_srv_link_set_type(struct osmo_stream_srv_link *link, int type);
 int osmo_stream_srv_link_set_domain(struct osmo_stream_srv_link *link, int 
domain);
-void osmo_stream_srv_link_set_accept_cb(struct osmo_stream_srv_link *link, int 
(*accept_cb)(struct osmo_stream_srv_link *link, int fd));
+void osmo_stream_srv_link_set_accept_cb(struct osmo_stream_srv_link *link, 
osmo_stream_srv_link_accept_cb_t accept_cb);
 void osmo_stream_srv_link_set_data(struct osmo_stream_srv_link *link, void 
*data);
 void *osmo_stream_srv_link_get_data(struct osmo_stream_srv_link *link);
 char *osmo_stream_srv_link_get_sockname(const struct osmo_stream_srv_link 
*link);
@@ -98,12 +100,20 @@
  * osmo_stream_srv_link */
 struct osmo_stream_srv;

-struct osmo_stream_srv *osmo_stream_srv_create(void *ctx, struct 
osmo_stream_srv_link *link, int fd, int (*read_cb)(struct osmo_stream_srv 
*conn), int (*closed_cb)(struct osmo_stream_srv *conn), void *data);
+typedef int (*osmo_stream_srv_read_cb_t)(struct osmo_stream_srv *conn);
+typedef int (*osmo_stream_srv_closed_cb_t)(struct osmo_stream_srv *conn);
+typedef int (*osmo_stream_srv_read_cb2_t)(struct osmo_stream_srv *conn, struct 
msgb *msg);
+typedef int (*osmo_stream_srv_segmentation_cb_t)(struct msgb *msg);
+
+struct osmo_stream_srv *osmo_stream_srv_create(void *ctx, struct 
osmo_stream_srv_link *link, int fd,
+  osmo_stream_srv_read_cb_t 
read_cb,
+  osmo_stream_srv_closed_cb_t 
closed_cb,
+  void *data);
 struct osmo_stream_srv *osmo_stream_srv_create2(void *ctx, struct 
osmo_stream_srv_link *link, int fd, void *data);
 void osmo_stream_srv_set_name(struct osmo_stream_srv *conn, const char *name);
 const char *osmo_stream_srv_get_name(const struct osmo_stream_srv *conn);
-void osmo_stream_srv_set_read_cb(struct osmo_stream_srv *conn, int 
(*read_cb)(struct osmo_stream_srv *conn, struct msgb *msg));
-void osmo_stream_srv_set_closed_cb(struct osmo_stream_srv *conn, int 
(*closed_cb)(struct osmo_stream_srv *conn));
+void osmo_stream_srv_set_read_cb(struct osmo_stream_srv *conn, 
osmo_stream_srv_read_cb2_t read_cb);
+void osmo_stream_srv_set_closed_cb(struct osmo_stream_srv *conn, 
osmo_stream_srv_closed_cb_t close_cb);
 void *osmo_stream_srv_get_data(struct osmo_stream_srv *conn);
 struct osmo_stream_srv_link *osmo_stream_srv_get_master(struct osmo_stream_srv 
*conn);
 const char *osmo_stream_srv_get_sockname(const struct osmo_stream_srv *conn);
@@ -115,8 +125,7 @@
 void osmo_stream_srv_set_flush_and_destroy(struct osmo_stream_srv *conn);
 void osmo_stream_srv_set_data(struct osmo_stream_srv *conn, void *data);

-void osmo_stream_srv_set_segmentation_cb(struct osmo_stream_srv *conn,
-   int (*segmentation_cb)(struct msgb 
*msg));
+void osmo_stream_srv_set_segmentation_cb(struct osmo_stream_srv *conn, 
osmo_stream_srv_segmentation_cb_t segmentation_cb);

 void osmo_stream_srv_send(struct osmo_stream_srv *conn, struct msgb *msg);
 int osmo_stream_srv_recv(struct osmo_stream_srv *conn, struct msgb *msg);
@@ -160,6 +169,12 @@
 /*! \brief Osmocom Stream Client: Single client connection */
 struct osmo_stream_cli;

+typedef int (*osmo_stream_cli_connect_cb_t)(struct osmo_stream_cli *cli);
+typedef int (*osmo_stream_cli_disconnect_cb_t)(struct osmo_stream_cli *cli);
+typedef int (*osmo_stream_cli_read_cb_t)(struct osmo_stream_cli

[S] Change in libosmo-netif[master]: stream_cli: Remove unused write_cb field

2024-04-18 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/36580?usp=email )

Change subject: stream_cli: Remove unused write_cb field
..

stream_cli: Remove unused write_cb field

Change-Id: I50bee754d01d8de01f4a25c14abf90275a1ac78e
---
M src/stream_cli.c
1 file changed, 9 insertions(+), 1 deletion(-)

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




diff --git a/src/stream_cli.c b/src/stream_cli.c
index 11c88ae..0427032 100644
--- a/src/stream_cli.c
+++ b/src/stream_cli.c
@@ -107,7 +107,6 @@
int (*disconnect_cb)(struct osmo_stream_cli *cli);
int (*read_cb)(struct osmo_stream_cli *cli);
int (*iofd_read_cb)(struct osmo_stream_cli *cli, struct msgb *msg);
-   int (*write_cb)(struct osmo_stream_cli *cli);
int (*segmentation_cb)(struct msgb *msg);
void*data;
int flags;

--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/36580?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I50bee754d01d8de01f4a25c14abf90275a1ac78e
Gerrit-Change-Number: 36580
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: jolly 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[M] Change in osmo-ttcn3-hacks[master]: Move f_str_split() Osmocom_VTY_Functions.ttcn -> Misc_Helpers.ttcn

2024-04-17 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36593?usp=email )

Change subject: Move f_str_split() Osmocom_VTY_Functions.ttcn -> 
Misc_Helpers.ttcn
..


Patch Set 4:

(1 comment)

Patchset:

PS4:
I'll probably need to use this function in the AMI_Functions.ttcn file I'm 
preparing.



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36593?usp=email
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: I54eff3eea60ed0624919baebfe0ff7393414d6b8
Gerrit-Change-Number: 36593
Gerrit-PatchSet: 4
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Wed, 17 Apr 2024 17:44:48 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[M] Change in osmo-ttcn3-hacks[master]: Move f_str_split() Osmocom_VTY_Functions.ttcn -> Misc_Helpers.ttcn

2024-04-17 Thread pespin
Attention is currently required from: pespin.

Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36593?usp=email

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

The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder


Change subject: Move f_str_split() Osmocom_VTY_Functions.ttcn -> 
Misc_Helpers.ttcn
..

Move f_str_split() Osmocom_VTY_Functions.ttcn -> Misc_Helpers.ttcn

This is quite a generic string handling function which fits better
in a generic utility file like Misc_Helpers.ttcn.

Change-Id: I54eff3eea60ed0624919baebfe0ff7393414d6b8
---
M library/Misc_Helpers.ttcn
M library/Osmocom_VTY_Functions.ttcn
M upf/UPF_Tests.ttcn
3 files changed, 39 insertions(+), 26 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/93/36593/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36593?usp=email
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: I54eff3eea60ed0624919baebfe0ff7393414d6b8
Gerrit-Change-Number: 36593
Gerrit-PatchSet: 4
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


[M] Change in osmo-ttcn3-hacks[master]: Move f_str_split() Osmocom_VTY_Functions.ttcn -> Misc_Helpers.ttcn

2024-04-17 Thread pespin
Attention is currently required from: pespin.

Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36593?usp=email

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

The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder


Change subject: Move f_str_split() Osmocom_VTY_Functions.ttcn -> 
Misc_Helpers.ttcn
..

Move f_str_split() Osmocom_VTY_Functions.ttcn -> Misc_Helpers.ttcn

This is quite a generic string handling function which fits better
in a generic utility file like Misc_Helpers.ttcn.

Change-Id: I54eff3eea60ed0624919baebfe0ff7393414d6b8
---
M library/Misc_Helpers.ttcn
M library/Osmocom_VTY_Functions.ttcn
2 files changed, 35 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/93/36593/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36593?usp=email
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: I54eff3eea60ed0624919baebfe0ff7393414d6b8
Gerrit-Change-Number: 36593
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


[M] Change in libosmo-netif[master]: stream_{cli,srv}: Add 'res' param to read_cb2

2024-04-17 Thread pespin
Attention is currently required from: fixeria, jolly, laforge.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/36574?usp=email )

Change subject: stream_{cli,srv}: Add 'res' param to read_cb2
..


Patch Set 4:

(1 comment)

Patchset:

PS4:
> When this is merged, then the related libosmo-sccp and osmo-bsc patches need 
> to be merged: […]
BSC_Tests also passed fine with the patchset applied.



--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/36574?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I395c75ff1e9904757ce1d767a9ac2f779593c4c8
Gerrit-Change-Number: 36574
Gerrit-PatchSet: 4
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: jolly 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: jolly 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Wed, 17 Apr 2024 17:38:34 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[M] Change in osmo-ttcn3-hacks[master]: Move f_str_split() Osmocom_VTY_Functions.ttcn -> Misc_Helpers.ttcn

2024-04-17 Thread pespin
Attention is currently required from: pespin.

Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36593?usp=email

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

The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder


Change subject: Move f_str_split() Osmocom_VTY_Functions.ttcn -> 
Misc_Helpers.ttcn
..

Move f_str_split() Osmocom_VTY_Functions.ttcn -> Misc_Helpers.ttcn

This is quite a generic string handling function which fits better
in a generic utility file like Misc_Helpers.ttcn.

Change-Id: I54eff3eea60ed0624919baebfe0ff7393414d6b8
---
M library/Misc_Helpers.ttcn
M library/Osmocom_VTY_Functions.ttcn
2 files changed, 32 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/93/36593/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36593?usp=email
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: I54eff3eea60ed0624919baebfe0ff7393414d6b8
Gerrit-Change-Number: 36593
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


[M] Change in osmo-ttcn3-hacks[master]: Move f_str_split() Osmocom_VTY_Functions.ttcn -> Misc_Helpers.ttcn

2024-04-17 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36593?usp=email )


Change subject: Move f_str_split() Osmocom_VTY_Functions.ttcn -> 
Misc_Helpers.ttcn
..

Move f_str_split() Osmocom_VTY_Functions.ttcn -> Misc_Helpers.ttcn

This is quite a generic string handling function which fits better
in a generic utility file like Misc_Helpers.ttcn.

Change-Id: I54eff3eea60ed0624919baebfe0ff7393414d6b8
---
M library/Misc_Helpers.ttcn
M library/Osmocom_VTY_Functions.ttcn
2 files changed, 31 insertions(+), 19 deletions(-)



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

diff --git a/library/Misc_Helpers.ttcn b/library/Misc_Helpers.ttcn
index cbc1e70..19e9514 100644
--- a/library/Misc_Helpers.ttcn
+++ b/library/Misc_Helpers.ttcn
@@ -79,4 +79,23 @@
return count;
 }

+function f_str_split(charstring str, charstring delim := "\n") return 
ro_charstring
+{
+   var integer pos := 0;
+   var ro_charstring parts := {};
+   var integer delim_pos;
+   var integer end := lengthof(str);
+   while (pos < end) {
+   delim_pos := f_strstr(str, delim, pos);
+   if (delim_pos < 0) {
+   delim_pos := end;
+   }
+   if (delim_pos > pos) {
+   parts := parts & { substr(str, pos, delim_pos - pos) };
+   }
+   pos := delim_pos + 1;
+   }
+   return parts;
+}
+
 }
diff --git a/library/Osmocom_VTY_Functions.ttcn 
b/library/Osmocom_VTY_Functions.ttcn
index 6b0883f..dd3ba3b 100644
--- a/library/Osmocom_VTY_Functions.ttcn
+++ b/library/Osmocom_VTY_Functions.ttcn
@@ -274,25 +274,6 @@
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "talloc count 
mismatch");
 }

-public function f_str_split(charstring str, charstring delim := "\n") return 
ro_charstring
-{
-   var integer pos := 0;
-   var ro_charstring parts := {};
-   var integer delim_pos;
-   var integer end := lengthof(str);
-   while (pos < end) {
-   delim_pos := f_strstr(str, delim, pos);
-   if (delim_pos < 0) {
-   delim_pos := end;
-   }
-   if (delim_pos > pos) {
-   parts := parts & { substr(str, pos, delim_pos - pos) };
-   }
-   pos := delim_pos + 1;
-   }
-   return parts;
-}
-
 public function f_verify_talloc_bytes(TELNETasp_PT pt, ro_charstring 
object_strs, integer expect_bytes := 0,
   integer attempts := 5, float wait_time 
:= 3.0)
 {

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36593?usp=email
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: I54eff3eea60ed0624919baebfe0ff7393414d6b8
Gerrit-Change-Number: 36593
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


[M] Change in osmo-ttcn3-hacks[master]: Move f_strstr_count() Osmocom_VTY_Functions.ttcn -> Misc_Helpers.ttcn

2024-04-17 Thread pespin
Attention is currently required from: pespin.

Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36592?usp=email

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

The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder


Change subject: Move f_strstr_count() Osmocom_VTY_Functions.ttcn -> 
Misc_Helpers.ttcn
..

Move f_strstr_count() Osmocom_VTY_Functions.ttcn -> Misc_Helpers.ttcn

This is quite a generic string handling function which fits better
in a generic utility file like Misc_Helpers.ttcn.

Change-Id: I105844d2bcab6c24624be1224c1ba78b69d4b44c
---
M ccid/gen_links.sh
M ccid/regen_makefile.sh
M library/Misc_Helpers.ttcn
M library/Osmocom_VTY_Functions.ttcn
M simtrace/gen_links.sh
M simtrace/regen_makefile.sh
6 files changed, 38 insertions(+), 23 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/92/36592/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36592?usp=email
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: I105844d2bcab6c24624be1224c1ba78b69d4b44c
Gerrit-Change-Number: 36592
Gerrit-PatchSet: 4
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


[M] Change in osmo-ttcn3-hacks[master]: Move f_strstr_count() Osmocom_VTY_Functions.ttcn -> Misc_Helpers.ttcn

2024-04-17 Thread pespin
Attention is currently required from: pespin.

Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36592?usp=email

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

The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder


Change subject: Move f_strstr_count() Osmocom_VTY_Functions.ttcn -> 
Misc_Helpers.ttcn
..

Move f_strstr_count() Osmocom_VTY_Functions.ttcn -> Misc_Helpers.ttcn

This is quite a generic string handling function which fits better
in a generic utility file like Misc_Helpers.ttcn.

Change-Id: I105844d2bcab6c24624be1224c1ba78b69d4b44c
---
M ccid/gen_links.sh
M ccid/regen_makefile.sh
M library/Misc_Helpers.ttcn
M library/Osmocom_VTY_Functions.ttcn
4 files changed, 34 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/92/36592/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36592?usp=email
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: I105844d2bcab6c24624be1224c1ba78b69d4b44c
Gerrit-Change-Number: 36592
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


[S] Change in osmo-ttcn3-hacks[master]: Move f_strstr_count() Osmocom_VTY_Functions.ttcn -> Misc_Helpers.ttcn

2024-04-17 Thread pespin
Attention is currently required from: pespin.

Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36592?usp=email

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

The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder


Change subject: Move f_strstr_count() Osmocom_VTY_Functions.ttcn -> 
Misc_Helpers.ttcn
..

Move f_strstr_count() Osmocom_VTY_Functions.ttcn -> Misc_Helpers.ttcn

This is quite a generic string handling function which fits better
in a generic utility file like Misc_Helpers.ttcn.

Change-Id: I105844d2bcab6c24624be1224c1ba78b69d4b44c
---
M library/Misc_Helpers.ttcn
M library/Osmocom_VTY_Functions.ttcn
2 files changed, 30 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/92/36592/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36592?usp=email
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: I105844d2bcab6c24624be1224c1ba78b69d4b44c
Gerrit-Change-Number: 36592
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


[S] Change in osmo-ttcn3-hacks[master]: Move f_strstr_count() Osmocom_VTY_Functions.ttcn -> Misc_Helpers.ttcn

2024-04-17 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36592?usp=email )


Change subject: Move f_strstr_count() Osmocom_VTY_Functions.ttcn -> 
Misc_Helpers.ttcn
..

Move f_strstr_count() Osmocom_VTY_Functions.ttcn -> Misc_Helpers.ttcn

This is quite a generic string handling function which fits better
in a generic utility file like Misc_Helpers.ttcn.

Change-Id: I105844d2bcab6c24624be1224c1ba78b69d4b44c
---
M library/Misc_Helpers.ttcn
M library/Osmocom_VTY_Functions.ttcn
2 files changed, 29 insertions(+), 17 deletions(-)



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

diff --git a/library/Misc_Helpers.ttcn b/library/Misc_Helpers.ttcn
index dda2c2c..33ea666 100644
--- a/library/Misc_Helpers.ttcn
+++ b/library/Misc_Helpers.ttcn
@@ -61,4 +61,21 @@
}
 }

+/* Return a count of how many times sub_str occurs in str. */
+function f_strstr_count(in charstring str, in charstring sub_str) return 
integer
+{
+   var integer count := 0;
+   var integer pos := 0;
+
+   while (true) {
+   var integer at := f_strstr(str, sub_str, pos);
+   if (at < 0) {
+   break;
+   }
+   count := count + 1;
+   pos := at + 1;
+   }
+   return count;
+}
+
 }
diff --git a/library/Osmocom_VTY_Functions.ttcn 
b/library/Osmocom_VTY_Functions.ttcn
index 3dd0429..6b0883f 100644
--- a/library/Osmocom_VTY_Functions.ttcn
+++ b/library/Osmocom_VTY_Functions.ttcn
@@ -228,23 +228,6 @@
return "";
 }

-/* Return a count of how many times sub_str occurs in str. */
-function f_strstr_count(in charstring str, in charstring sub_str) return 
integer
-{
-   var integer count := 0;
-   var integer pos := 0;
-
-   while (true) {
-   var integer at := f_strstr(str, sub_str, pos);
-   if (at < 0) {
-   break;
-   }
-   count := count + 1;
-   pos := at + 1;
-   }
-   return count;
-}
-
 private type record of charstring StrList;

 /* Perform a 'show talloc-context' to get a count of the given object_strs 
that are still allocated.

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36592?usp=email
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: I105844d2bcab6c24624be1224c1ba78b69d4b44c
Gerrit-Change-Number: 36592
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


[S] Change in osmo-ttcn3-hacks[master]: .gitignore: Add .vscode/ directory

2024-04-17 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36591?usp=email )


Change subject: .gitignore: Add .vscode/ directory
..

.gitignore: Add .vscode/ directory

Change-Id: I8a5c5ca50591a0f531258dd59df462ec2ff5f81c
---
M .gitignore
1 file changed, 10 insertions(+), 0 deletions(-)



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

diff --git a/.gitignore b/.gitignore
index e77dfa7..96dccf8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,3 +22,4 @@
 sms.db
 sms.db-shm
 sms.db-wal
+.vscode/

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36591?usp=email
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: I8a5c5ca50591a0f531258dd59df462ec2ff5f81c
Gerrit-Change-Number: 36591
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


[M] Change in osmo-ttcn3-hacks[master]: sgsn: add testcases for SGSN Context Request procedure

2024-04-17 Thread pespin
Attention is currently required from: fixeria.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36589?usp=email )

Change subject: sgsn: add testcases for SGSN Context Request procedure
..


Patch Set 1:

(1 comment)

File sgsn/SGSN_Tests.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36589/comment/1d0acedf_4ecff507
PS1, Line 3950: execute( TC_sgsn_context_req_in() );
> I am not 100% sure, but on the SGSN side you don't really know if it's 
> E-UTRAN sending the `SGSN Con […]
Ah indeed, there's no RAT type being sent in there, good point.



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36589?usp=email
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: If71de10897a8a9f6612cd46c760cd89c0299ac2c
Gerrit-Change-Number: 36589
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Wed, 17 Apr 2024 16:27:36 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[M] Change in libosmo-netif[master]: stream_{cli,srv}: Add 'res' param to read_cb2

2024-04-17 Thread pespin
Attention is currently required from: fixeria, jolly, laforge.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/36574?usp=email )

Change subject: stream_{cli,srv}: Add 'res' param to read_cb2
..


Patch Set 4:

(1 comment)

Patchset:

PS4:
> This seems to be working well so far after running stuff like STP_Tests, 
> HNBGW_Tests, plus the follo […]
When this is merged, then the related libosmo-sccp and osmo-bsc patches need to 
be merged:
https://gerrit.osmocom.org/c/libosmo-sccp/+/36575
https://gerrit.osmocom.org/c/osmo-bsc/+/36576



--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/36574?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I395c75ff1e9904757ce1d767a9ac2f779593c4c8
Gerrit-Change-Number: 36574
Gerrit-PatchSet: 4
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: jolly 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: jolly 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Wed, 17 Apr 2024 16:14:33 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[M] Change in libosmo-netif[master]: stream_{cli,srv}: Add 'res' param to read_cb2

2024-04-17 Thread pespin
Attention is currently required from: fixeria, jolly, laforge.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/36574?usp=email )

Change subject: stream_{cli,srv}: Add 'res' param to read_cb2
..


Patch Set 4:

(1 comment)

This change is ready for review.

Patchset:

PS4:
This seems to be working well so far after running stuff like STP_Tests, 
HNBGW_Tests, plus the following scenario which was triggering errors reported 
by Vadim:
1) cd osmo-ttcn3-hacks/msc/
2) osmo-stp -c osmo-stp.cfg
3) osmo-msc -c osmo-msc.cfg

It can be reviewed and merged.



--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/36574?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I395c75ff1e9904757ce1d767a9ac2f779593c4c8
Gerrit-Change-Number: 36574
Gerrit-PatchSet: 4
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: jolly 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: jolly 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Wed, 17 Apr 2024 16:13:44 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in osmo-ttcn3-hacks[master]: sgsn: fix unused param in f_routing_area_update()

2024-04-17 Thread pespin
Attention is currently required from: fixeria.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36587?usp=email )

Change subject: sgsn: fix unused param in f_routing_area_update()
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36587?usp=email
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: I582b2836eba3188cfd4c640b1febbd25c50001e0
Gerrit-Change-Number: 36587
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Wed, 17 Apr 2024 14:57:23 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-ttcn3-hacks[master]: sgsn: add testcases for SGSN Context Request procedure

2024-04-17 Thread pespin
Attention is currently required from: fixeria.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36589?usp=email )

Change subject: sgsn: add testcases for SGSN Context Request procedure
..


Patch Set 1: Code-Review+1

(1 comment)

File sgsn/SGSN_Tests.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36589/comment/e61da397_f0d4867e
PS1, Line 3950: execute( TC_sgsn_context_req_in() );
I'd state somewhere in the name that it's from/to "EUTRAN".



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36589?usp=email
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: If71de10897a8a9f6612cd46c760cd89c0299ac2c
Gerrit-Change-Number: 36589
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Wed, 17 Apr 2024 14:56:08 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-ttcn3-hacks[master]: sgsn: derive altsteps from f_routing_area_update()

2024-04-17 Thread pespin
Attention is currently required from: fixeria.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36588?usp=email )

Change subject: sgsn: derive altsteps from f_routing_area_update()
..


Patch Set 1: Code-Review+1

(2 comments)

File sgsn/SGSN_Tests.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36588/comment/21f69879_223f72ea
PS1, Line 2643: mtc.stop;
good candaidate for Misc_Helpers.shutdown (ofc don't need to do it here).


https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36588/comment/7d54cceb_4b3a965d
PS1, Line 2737: 
f_routing_area_update(f_cellid_to_RAI(g_pars.bssgp_cell_id[1]), ran_index := 1);
this looks unrelated?



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36588?usp=email
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: I7d5ec9c42a37a5746c36745ac738fd77e1632675
Gerrit-Change-Number: 36588
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Wed, 17 Apr 2024 14:52:10 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-ttcn3-hacks[master]: sgsn: fix unused param in f_routing_area_update()

2024-04-17 Thread pespin
Attention is currently required from: fixeria.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36587?usp=email )

Change subject: sgsn: fix unused param in f_routing_area_update()
..


Patch Set 1:

(1 comment)

Patchset:

PS1:
I fail to see how the commit message matches the changes, sorry. Explain better 
please.



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36587?usp=email
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: I582b2836eba3188cfd4c640b1febbd25c50001e0
Gerrit-Change-Number: 36587
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Wed, 17 Apr 2024 14:49:29 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in osmo-ttcn3-hacks[master]: library: GTPv1C add ts_MM_ContextGSM

2024-04-17 Thread pespin
Attention is currently required from: fixeria.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36586?usp=email )

Change subject: library: GTPv1C add ts_MM_ContextGSM
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36586?usp=email
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: I483fdd0dee6e0ee92fcee798d8e85a80d1e0be8b
Gerrit-Change-Number: 36586
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Wed, 17 Apr 2024 14:47:54 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-ttcn3-hacks[master]: library: cosmetic: fix code formatting

2024-04-17 Thread pespin
Attention is currently required from: fixeria.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36585?usp=email )

Change subject: library: cosmetic: fix code formatting
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36585?usp=email
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: Ic87f6e8dcb8e507d21082f28217c015ff2e5204b
Gerrit-Change-Number: 36585
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Wed, 17 Apr 2024 14:47:27 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libosmo-sccp[master]: Fix wrong string prefix in log line

2024-04-17 Thread pespin
Attention is currently required from: daniel, jolly, osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/36584?usp=email )

Change subject: Fix wrong string prefix in log line
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/36584?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: Ifd16ff671d842ae90ec70c2e819a43174f3aa09a
Gerrit-Change-Number: 36584
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: jolly 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: jolly 
Gerrit-Attention: daniel 
Gerrit-Comment-Date: Wed, 17 Apr 2024 14:46:03 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libosmo-sccp[master]: Fix wrong string prefix in log line

2024-04-17 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/36584?usp=email )

Change subject: Fix wrong string prefix in log line
..

Fix wrong string prefix in log line

Change-Id: Ifd16ff671d842ae90ec70c2e819a43174f3aa09a
---
M src/osmo_ss7_asp.c
1 file changed, 10 insertions(+), 1 deletion(-)

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




diff --git a/src/osmo_ss7_asp.c b/src/osmo_ss7_asp.c
index 90c72a9..1ce159a 100644
--- a/src/osmo_ss7_asp.c
+++ b/src/osmo_ss7_asp.c
@@ -823,7 +823,7 @@
 
if (flags & OSMO_STREAM_SCTP_MSG_FLAGS_NOTIFICATION) {
union sctp_notification *notif = (union sctp_notification *) 
msgb_data(msg);
-   log_sctp_notification(asp, "xUA CLNT", notif);
+   log_sctp_notification(asp, "xUA SRV", notif);
asp_handle_sctp_notif_monitor_primary_address(asp, notif);

switch (notif->sn_header.sn_type) {

--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/36584?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: Ifd16ff671d842ae90ec70c2e819a43174f3aa09a
Gerrit-Change-Number: 36584
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: jolly 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[S] Change in docker-playground[master]: ttcn3-hnbgw: Apply latest changes to 'with-pfcp' scenario

2024-04-17 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/docker-playground/+/36590?usp=email )


Change subject: ttcn3-hnbgw: Apply latest changes to 'with-pfcp' scenario
..

ttcn3-hnbgw: Apply latest changes to 'with-pfcp' scenario

Recent commits applied changes to the default scenario, but forgot to
apply them to the 'with-pfcp' subdir.

Fixes: 6de89a5fb529928ce9b7b3320e0ca2e3e568d458
Fixes: 3736d31fc0314cb5d39c707374eecdcfe33241c9
Fixes: 0bdbcd6815358a7b1c4b0bb4575a585c45a01e57
Fixes: 2c22a96355b8e057dbd85ac1922ae84cc63f8b1e
Fixes: d3711e67103691171d7ed3e224c050e78c1f5bc4
Change-Id: Ie02a0754a6ca985e60e08f1f171f532b6cc16264
---
M ttcn3-hnbgw-test/with-pfcp/HNBGW_Tests.cfg
M ttcn3-hnbgw-test/with-pfcp/osmo-hnbgw.cfg
2 files changed, 36 insertions(+), 4 deletions(-)



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

diff --git a/ttcn3-hnbgw-test/with-pfcp/HNBGW_Tests.cfg 
b/ttcn3-hnbgw-test/with-pfcp/HNBGW_Tests.cfg
index 16173de..c07e571 100644
--- a/ttcn3-hnbgw-test/with-pfcp/HNBGW_Tests.cfg
+++ b/ttcn3-hnbgw-test/with-pfcp/HNBGW_Tests.cfg
@@ -11,11 +11,13 @@

 [TESTPORT_PARAMETERS]
 *.HNBGWVTY.CTRL_HOSTNAME := "172.18.35.20"
+*.STATSVTY.CTRL_HOSTNAME := "172.18.35.20"

 [MODULE_PARAMETERS]
 HNBGW_Tests.mp_hnodeb_ip := "172.18.35.203";
 HNBGW_Tests.mp_hnbgw_ip := "172.18.35.20";
 HNBGW_Tests.mp_mgw_ip := "172.18.35.203";
+HNBGW_Tests.mp_local_statsd_ip := "172.18.35.203";
 HNBGW_Tests.mp_cn_cfg := {
{
transport := RANAP_TRANSPORT_IuCS,
@@ -114,6 +116,8 @@
 HNBGW_Tests.mp_pfcp_ip_local := "172.18.35.203";
 HNBGW_Tests.mp_pfcp_ip_remote := "172.18.35.20";
 HNBGW_Tests.mp_validate_talloc_asn1 := true;
+# keep in sync with osmo-hnbgw.cfg "timer hnbgw x31":
++HNBGW_Tests.mp_hnbgw_timer_x31 := 5;

 [MAIN_CONTROLLER]

diff --git a/ttcn3-hnbgw-test/with-pfcp/osmo-hnbgw.cfg 
b/ttcn3-hnbgw-test/with-pfcp/osmo-hnbgw.cfg
index d10ea6d..7deff1e 100644
--- a/ttcn3-hnbgw-test/with-pfcp/osmo-hnbgw.cfg
+++ b/ttcn3-hnbgw-test/with-pfcp/osmo-hnbgw.cfg
@@ -8,7 +8,7 @@
 !
 log stderr
  logging filter all 1
- logging color 0
+ logging color 1
  logging print category-hex 0
  logging print category 1
  logging print level 1
@@ -19,10 +19,21 @@
 !
 line vty
  no login
- bind 0.0.0.0
+ bind 172.18.35.20
 ctrl
- bind 0.0.0.0
+ bind 172.18.35.20
 !
++
+stats interval 0
+stats reporter statsd
+ prefix TTCN3
+ level subscriber
+ remote-ip 172.18.35.203
+ remote-port 8125
+ flush-period 1
+ mtu 1024
+ enable
+
 cs7 instance 0
  asp asp-clnt-msc-0 2905 2905 m3ua
   local-ip 172.18.35.20
@@ -68,7 +79,7 @@
   local-ip 172.18.35.20
   local-port 29169
   hnbap-allow-tmsi 1
- mgcp
+ mgw 0
   mgw local-ip 172.18.35.20
   mgw remote-ip 172.18.35.203
  # don't spam RANAP RESET messages for up to eight CN links across all tests

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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Ie02a0754a6ca985e60e08f1f171f532b6cc16264
Gerrit-Change-Number: 36590
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


[M] Change in libosmo-sccp[master]: ss7_asp: Update osmo_stream read_cb2 functions to accommodate for new...

2024-04-17 Thread pespin
Attention is currently required from: pespin.

Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/libosmo-sccp/+/36575?usp=email

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

The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder


Change subject: ss7_asp: Update osmo_stream read_cb2 functions to accommodate 
for new API param
..

ss7_asp: Update osmo_stream read_cb2 functions to accommodate for new API param

libosmo-netif (not yet released) stream_{cli,srv} osmo_io read_cb API was
updated to provide read result status. Hence, now API users (ss7_asp)
can account for lower layer errors and act properly, like it used to
do with the previous ofd backend.

This commit partially reverts some error code paths removed in
9257cd896e255403822bee6f87f5487a92fd3c11 when converting code to use
osmo_io osmo_stream backend.

Change-Id: I579f4101a9e2874e310ff78e4571f38cfe8dfab0
Depends: libosmo-netif.git Change-Id I395c75ff1e9904757ce1d767a9ac2f779593c4c8
---
M src/osmo_ss7_asp.c
M src/ss7_internal.h
2 files changed, 79 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/75/36575/6
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/36575?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I579f4101a9e2874e310ff78e4571f38cfe8dfab0
Gerrit-Change-Number: 36575
Gerrit-PatchSet: 6
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


[M] Change in libosmo-sccp[master]: ss7_asp: Update osmo_stream read_cb2 functions to accommodate for new...

2024-04-17 Thread pespin
Attention is currently required from: pespin.

Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/libosmo-sccp/+/36575?usp=email

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

The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder


Change subject: ss7_asp: Update osmo_stream read_cb2 functions to accommodate 
for new API param
..

ss7_asp: Update osmo_stream read_cb2 functions to accommodate for new API param

libosmo-netif (not yet released) stream_{cli,srv} osmo_io read_cb API was
updated to provide read result status. Hence, now API users (ss7_asp)
can account for lower layer errors and act properly, like it used to
do with the previous ofd backend.

This commit partially reverts some error code paths removed in
9257cd896e255403822bee6f87f5487a92fd3c11 when converting code to use
osmo_io osmo_stream backend.

Change-Id: I579f4101a9e2874e310ff78e4571f38cfe8dfab0
Depends: libosmo-netif.git Change-Id I395c75ff1e9904757ce1d767a9ac2f779593c4c8
---
M src/osmo_ss7_asp.c
M src/ss7_internal.h
2 files changed, 77 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/75/36575/5
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/36575?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I579f4101a9e2874e310ff78e4571f38cfe8dfab0
Gerrit-Change-Number: 36575
Gerrit-PatchSet: 5
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


[S] Change in libosmo-sccp[master]: Fix wrong string prefix in log line

2024-04-17 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/36584?usp=email )


Change subject: Fix wrong string prefix in log line
..

Fix wrong string prefix in log line

Change-Id: Ifd16ff671d842ae90ec70c2e819a43174f3aa09a
---
M src/osmo_ss7_asp.c
1 file changed, 10 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/84/36584/1

diff --git a/src/osmo_ss7_asp.c b/src/osmo_ss7_asp.c
index 90c72a9..1ce159a 100644
--- a/src/osmo_ss7_asp.c
+++ b/src/osmo_ss7_asp.c
@@ -823,7 +823,7 @@

if (flags & OSMO_STREAM_SCTP_MSG_FLAGS_NOTIFICATION) {
union sctp_notification *notif = (union sctp_notification *) 
msgb_data(msg);
-   log_sctp_notification(asp, "xUA CLNT", notif);
+   log_sctp_notification(asp, "xUA SRV", notif);
asp_handle_sctp_notif_monitor_primary_address(asp, notif);

switch (notif->sn_header.sn_type) {

--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/36584?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: Ifd16ff671d842ae90ec70c2e819a43174f3aa09a
Gerrit-Change-Number: 36584
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


[S] Change in libosmo-netif[master]: tests/stream: Fix missing msgb_free()

2024-04-17 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/36583?usp=email )


Change subject: tests/stream: Fix missing msgb_free()
..

tests/stream: Fix missing msgb_free()

Change-Id: I7e7579175aa6a7c1c22eb3bc147a67f6f62ad6bc
---
M tests/stream/stream_test.c
1 file changed, 10 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/83/36583/1

diff --git a/tests/stream/stream_test.c b/tests/stream/stream_test.c
index e50752b..f52a675 100644
--- a/tests/stream/stream_test.c
+++ b/tests/stream/stream_test.c
@@ -592,6 +592,7 @@
osmo_stream_srv_send(conn, m);
} else if (msgnum_srv == 7 && *msgt == IPAC_MSGT_PONG) {
test_segm_ipa_stream_srv_all_msgs_processed = true;
+   msgb_free(msg);
osmo_stream_srv_destroy(conn);
}
return 0;

--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/36583?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I7e7579175aa6a7c1c22eb3bc147a67f6f62ad6bc
Gerrit-Change-Number: 36583
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


[S] Change in libosmocore[master]: osmo_io: Add iofd param to segmentation_cb

2024-04-17 Thread pespin
Attention is currently required from: daniel, fixeria, jolly, laforge.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/36582?usp=email )

Change subject: osmo_io: Add iofd param to segmentation_cb
..


Patch Set 2:

(1 comment)

Patchset:

PS1:
Please read https://osmocom.org/issues/6437 before reviewing this patch



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36582?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ib8d77e30b1ea759ee5ac2a69d704e81ea71e3079
Gerrit-Change-Number: 36582
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: jolly 
Gerrit-Reviewer: laforge 
Gerrit-Attention: jolly 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-Attention: daniel 
Gerrit-Comment-Date: Wed, 17 Apr 2024 12:26:19 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in libosmocore[master]: osmo_io: Add iofd param to segmentation_cb

2024-04-17 Thread pespin
Attention is currently required from: pespin.

Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/libosmocore/+/36582?usp=email

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

The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder


Change subject: osmo_io: Add iofd param to segmentation_cb
..

osmo_io: Add iofd param to segmentation_cb

See related ticket for full rant and historical facts about this
callback.
Since anyway we are still developing osmo_io stuff and there will be ABI
breaks when releasing new version, let's udpate the callback signature
too.

Related: OS#6437
Change-Id: Ib8d77e30b1ea759ee5ac2a69d704e81ea71e3079
---
M include/osmocom/core/osmo_io.h
M include/osmocom/gsm/cbsp.h
M src/core/osmo_io.c
M src/gsm/cbsp.c
4 files changed, 32 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/82/36582/2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36582?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ib8d77e30b1ea759ee5ac2a69d704e81ea71e3079
Gerrit-Change-Number: 36582
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


[S] Change in libosmocore[master]: osmo_io: Add iofd param to segmentation_cb

2024-04-17 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/36582?usp=email )


Change subject: osmo_io: Add iofd param to segmentation_cb
..

osmo_io: Add iofd param to segmentation_cb

See related ticket for full rant and historical facts about this
callback.
Since anyway we are still developing osmo_io stuff and there will be ABI
breaks when releasing new version, let's udpate the callback signature
too.

Related: OS#6437
Change-Id: Ib8d77e30b1ea759ee5ac2a69d704e81ea71e3079
---
M include/osmocom/core/osmo_io.h
M include/osmocom/gsm/cbsp.h
M src/core/osmo_io.c
M src/gsm/cbsp.c
4 files changed, 30 insertions(+), 7 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/82/36582/1

diff --git a/include/osmocom/core/osmo_io.h b/include/osmocom/core/osmo_io.h
index 8c931dd..f86e968 100644
--- a/include/osmocom/core/osmo_io.h
+++ b/include/osmocom/core/osmo_io.h
@@ -100,6 +100,7 @@
 *  \param[in] msg message buffer containing the read data. 
Ownership is transferred to the
 *  call-back, and it must make sure to msgb_free() it 
eventually! */
void (*read_cb)(struct osmo_io_fd *iofd, int res, struct msgb 
*msg);
+
/*! completion call-back function when write issued via 
osmo_iofd_write_msgb() has completed
 * on fd. Only valid in OSMO_IO_FD_MODE_READ_WRITE.
 *  \param[in] iofd on which a write() has completed.
@@ -108,9 +109,15 @@
 *  call-back; it is automatically freed after the call-back 
terminates! */
void (*write_cb)(struct osmo_io_fd *iofd, int res,
 struct msgb *msg);
-   /*! optional call-back function to segment the data at message 
boundaries. This is useful when
-*  message boundaries are to be preserved over a SOCK_STREAM 
transport socket like TCP.  Can
-*  be NULL for any application not requiring de-segmentation 
of received data.
+
+   /*! optional call-back function to segment the data at message 
boundaries.
+*  \param[in] iofd handling msg
+*  \param[in] msg message buffer whose data is to be segmented
+*  \returns See full function description.
+*
+*  This is useful when message boundaries are to be preserved 
over a SOCK_STREAM transport
+*  socket like TCP.  Can be NULL for any application not 
requiring de-segmentation of
+*  received data.
 *
 *  The call-back needs to return the size of the next message. 
If it returns
 *  -EAGAIN or a value larger than msgb_length() (message is 
incomplete)
@@ -120,7 +127,7 @@
 *  the msgb will be trimmed to size by osmo_io and forwarded 
to the read call-back. Any
 *  parsing done to the msgb by segmentation_cb() will be 
preserved for the read_cb()
 *  (e.g. setting lxh or msgb->cb). */
-   int (*segmentation_cb)(struct msgb *msg);
+   int (*segmentation_cb)(struct osmo_io_fd *iofd, struct msgb 
*msg);
};

/* mode OSMO_IO_FD_MODE_RECVFROM_SENDTO: */
diff --git a/include/osmocom/gsm/cbsp.h b/include/osmocom/gsm/cbsp.h
index efa4ce6..d15e6f8 100644
--- a/include/osmocom/gsm/cbsp.h
+++ b/include/osmocom/gsm/cbsp.h
@@ -312,4 +312,4 @@
 struct osmo_cbsp_decoded *osmo_cbsp_decoded_alloc(void *ctx,  enum 
cbsp_msg_type msg_type);

 int osmo_cbsp_recv_buffered(void *ctx, int fd, struct msgb **rmsg, struct msgb 
**tmp_msg);
-int osmo_cbsp_segmentation_cb(struct msgb *msg);
+int osmo_cbsp_segmentation_cb(struct osmo_io_fd *iofd, struct msgb *msg);
diff --git a/src/core/osmo_io.c b/src/core/osmo_io.c
index b589cb7..f908e80 100644
--- a/src/core/osmo_io.c
+++ b/src/core/osmo_io.c
@@ -280,7 +280,7 @@
return IOFD_SEG_ACT_HANDLE_ONE;
}

-   int expected_len = iofd->io_ops.segmentation_cb(msg);
+   int expected_len = iofd->io_ops.segmentation_cb(iofd, msg);
if (expected_len == -EAGAIN) {
goto defer;
} else if (expected_len < 0) {
diff --git a/src/gsm/cbsp.c b/src/gsm/cbsp.c
index a5e58f4..dbc3830 100644
--- a/src/gsm/cbsp.c
+++ b/src/gsm/cbsp.c
@@ -1570,7 +1570,7 @@
 /*! call-back function to segment the data at message boundaries.
  * Returns  the size of the next message. If it returns -EAGAIN or a value 
larger than msgb_length() (message
  * is incomplete), the caller (e.g. osmo_io) has to wait for more data to be 
read. */
-int osmo_cbsp_segmentation_cb(struct msgb *msg)
+int osmo_cbsp_segmentation_cb(struct osmo_io_fd *iofd, struct msgb *msg)
 {
const struct cbsp_header *h;
int len;

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36582?usp=email
To unsubscribe, or for help 

[S] Change in libosmo-netif[master]: stream_cli: Remove unused write_cb field

2024-04-17 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/36580?usp=email )


Change subject: stream_cli: Remove unused write_cb field
..

stream_cli: Remove unused write_cb field

Change-Id: I50bee754d01d8de01f4a25c14abf90275a1ac78e
---
M src/stream_cli.c
1 file changed, 9 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/80/36580/1

diff --git a/src/stream_cli.c b/src/stream_cli.c
index 11c88ae..0427032 100644
--- a/src/stream_cli.c
+++ b/src/stream_cli.c
@@ -107,7 +107,6 @@
int (*disconnect_cb)(struct osmo_stream_cli *cli);
int (*read_cb)(struct osmo_stream_cli *cli);
int (*iofd_read_cb)(struct osmo_stream_cli *cli, struct msgb *msg);
-   int (*write_cb)(struct osmo_stream_cli *cli);
int (*segmentation_cb)(struct msgb *msg);
void*data;
int flags;

--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/36580?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I50bee754d01d8de01f4a25c14abf90275a1ac78e
Gerrit-Change-Number: 36580
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


[M] Change in libosmo-netif[master]: stream: Define types for each API callback

2024-04-17 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/36581?usp=email )


Change subject: stream: Define types for each API callback
..

stream: Define types for each API callback

The amount and complexity of callbacks is increasing over time.
Use typedefs to define each of them so that callbacks:
- Are easier to identify (which types is used where)
- Are easier to document (have a 1st class place to write doxygen
  documentation)

Change-Id: Ib0c4a9713fa4c755e457b8c2cbde6a7724d36e28
---
M include/osmocom/netif/stream.h
M src/stream_cli.c
M src/stream_srv.c
3 files changed, 65 insertions(+), 33 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/81/36581/1

diff --git a/include/osmocom/netif/stream.h b/include/osmocom/netif/stream.h
index 61bc1ad..398b277 100644
--- a/include/osmocom/netif/stream.h
+++ b/include/osmocom/netif/stream.h
@@ -62,6 +62,8 @@
 /*! \brief Osmocom Stream Server Link: A server socket listening/accepting */
 struct osmo_stream_srv_link;

+typedef int (*osmo_stream_srv_link_accept_cb_t)(struct osmo_stream_srv_link 
*link, int fd);
+
 struct osmo_stream_srv_link *osmo_stream_srv_link_create(void *ctx);
 void osmo_stream_srv_link_destroy(struct osmo_stream_srv_link *link);

@@ -74,7 +76,7 @@
 void osmo_stream_srv_link_set_proto(struct osmo_stream_srv_link *link, 
uint16_t proto);
 int osmo_stream_srv_link_set_type(struct osmo_stream_srv_link *link, int type);
 int osmo_stream_srv_link_set_domain(struct osmo_stream_srv_link *link, int 
domain);
-void osmo_stream_srv_link_set_accept_cb(struct osmo_stream_srv_link *link, int 
(*accept_cb)(struct osmo_stream_srv_link *link, int fd));
+void osmo_stream_srv_link_set_accept_cb(struct osmo_stream_srv_link *link, 
osmo_stream_srv_link_accept_cb_t accept_cb);
 void osmo_stream_srv_link_set_data(struct osmo_stream_srv_link *link, void 
*data);
 void *osmo_stream_srv_link_get_data(struct osmo_stream_srv_link *link);
 char *osmo_stream_srv_link_get_sockname(const struct osmo_stream_srv_link 
*link);
@@ -98,12 +100,20 @@
  * osmo_stream_srv_link */
 struct osmo_stream_srv;

-struct osmo_stream_srv *osmo_stream_srv_create(void *ctx, struct 
osmo_stream_srv_link *link, int fd, int (*read_cb)(struct osmo_stream_srv 
*conn), int (*closed_cb)(struct osmo_stream_srv *conn), void *data);
+typedef int (*osmo_stream_srv_read_cb_t)(struct osmo_stream_srv *conn);
+typedef int (*osmo_stream_srv_closed_cb_t)(struct osmo_stream_srv *conn);
+typedef int (*osmo_stream_srv_read_cb2_t)(struct osmo_stream_srv *conn, struct 
msgb *msg);
+typedef int (*osmo_stream_srv_segmentation_cb_t)(struct msgb *msg);
+
+struct osmo_stream_srv *osmo_stream_srv_create(void *ctx, struct 
osmo_stream_srv_link *link, int fd,
+  osmo_stream_srv_read_cb_t 
read_cb,
+  osmo_stream_srv_closed_cb_t 
closed_cb,
+  void *data);
 struct osmo_stream_srv *osmo_stream_srv_create2(void *ctx, struct 
osmo_stream_srv_link *link, int fd, void *data);
 void osmo_stream_srv_set_name(struct osmo_stream_srv *conn, const char *name);
 const char *osmo_stream_srv_get_name(const struct osmo_stream_srv *conn);
-void osmo_stream_srv_set_read_cb(struct osmo_stream_srv *conn, int 
(*read_cb)(struct osmo_stream_srv *conn, struct msgb *msg));
-void osmo_stream_srv_set_closed_cb(struct osmo_stream_srv *conn, int 
(*closed_cb)(struct osmo_stream_srv *conn));
+void osmo_stream_srv_set_read_cb(struct osmo_stream_srv *conn, 
osmo_stream_srv_read_cb2_t read_cb);
+void osmo_stream_srv_set_closed_cb(struct osmo_stream_srv *conn, 
osmo_stream_srv_closed_cb_t close_cb);
 void *osmo_stream_srv_get_data(struct osmo_stream_srv *conn);
 struct osmo_stream_srv_link *osmo_stream_srv_get_master(struct osmo_stream_srv 
*conn);
 const char *osmo_stream_srv_get_sockname(const struct osmo_stream_srv *conn);
@@ -115,8 +125,7 @@
 void osmo_stream_srv_set_flush_and_destroy(struct osmo_stream_srv *conn);
 void osmo_stream_srv_set_data(struct osmo_stream_srv *conn, void *data);

-void osmo_stream_srv_set_segmentation_cb(struct osmo_stream_srv *conn,
-   int (*segmentation_cb)(struct msgb 
*msg));
+void osmo_stream_srv_set_segmentation_cb(struct osmo_stream_srv *conn, 
osmo_stream_srv_segmentation_cb_t segmentation_cb);

 void osmo_stream_srv_send(struct osmo_stream_srv *conn, struct msgb *msg);
 int osmo_stream_srv_recv(struct osmo_stream_srv *conn, struct msgb *msg);
@@ -160,6 +169,12 @@
 /*! \brief Osmocom Stream Client: Single client connection */
 struct osmo_stream_cli;

+typedef int (*osmo_stream_cli_connect_cb_t)(struct osmo_stream_cli *cli);
+typedef int (*osmo_stream_cli_disconnect_cb_t)(struct osmo_stream_cli *cli);
+typedef int (*osmo_stream_cli_read_cb_t)(struct osmo_stream_cli *cli);
+typedef int (*osmo_stream_cli_read_cb2_t

[S] Change in osmo-hnbgw[master]: hnbap: Avoid calling duplicate getpeername() for each registered HNB

2024-04-17 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-hnbgw/+/36567?usp=email )

Change subject: hnbap: Avoid calling duplicate getpeername() for each 
registered HNB
..

hnbap: Avoid calling duplicate getpeername() for each registered HNB

Change-Id: I980de31d1296c3b956146a461609bec76ed3d430
---
M src/osmo-hnbgw/hnbgw_hnbap.c
1 file changed, 22 insertions(+), 10 deletions(-)

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




diff --git a/src/osmo-hnbgw/hnbgw_hnbap.c b/src/osmo-hnbgw/hnbgw_hnbap.c
index 4fa59b9..a632311 100644
--- a/src/osmo-hnbgw/hnbgw_hnbap.c
+++ b/src/osmo-hnbgw/hnbgw_hnbap.c
@@ -478,6 +478,8 @@
const char *cell_id_str;
struct timespec tp;
HNBAP_Cause_t cause;
+   struct osmo_sockaddr cur_osa = {};
+   socklen_t len = sizeof(cur_osa);

rc = hnbap_decode_hnbregisterrequesties(, in);
if (rc < 0) {
@@ -499,6 +501,15 @@
ctx->id.mnc = plmn.mnc;
cell_id_str = umts_cell_id_name(>id);

+   if (getpeername(ofd->fd, _osa.u.sa, ) < 0) {
+   LOGHNB(ctx, DHNBAP, LOGL_ERROR, "HNB-REGISTER-REQ %s: rejecting 
due to getpeername() error: %s\n",
+  cell_id_str, strerror(errno));
+   hnbap_free_hnbregisterrequesties();
+   cause.present = HNBAP_Cause_PR_radioNetwork;
+   cause.choice.radioNetwork = 
HNBAP_CauseRadioNetwork_hNB_parameter_mismatch;
+   return hnbgw_tx_hnb_register_rej(ctx, );
+   }
+
hnbp = hnb_persistent_find_by_id(>id);
if (!hnbp && g_hnbgw->config.accept_all_hnb)
hnbp = hnb_persistent_alloc(>id);
@@ -510,6 +521,7 @@
cause.choice.radioNetwork = 
HNBAP_CauseRadioNetwork_unauthorised_HNB;
return hnbgw_tx_hnb_register_rej(ctx, );
}
+
ctx->persistent = hnbp;
hnbp->ctx = ctx;

@@ -523,22 +535,13 @@
 * fault (bug), and we release the old context to keep 
going... */
struct osmo_fd *other_fd = 
osmo_stream_srv_get_ofd(hnb->conn);
struct osmo_sockaddr other_osa = {};
-   struct osmo_sockaddr cur_osa = {};
socklen_t len = sizeof(other_osa);
if (getpeername(other_fd->fd, _osa.u.sa, ) < 
0) {
LOGHNB(ctx, DHNBAP, LOGL_ERROR, "BUG! Found old 
registered HNB with invalid socket, releasing it\n");
hnb_context_release(hnb);
continue;
}
-   len = sizeof(cur_osa);
-   if (getpeername(ofd->fd, _osa.u.sa, ) < 0) {
-   LOGHNB(ctx, DHNBAP, LOGL_ERROR, "Error 
getpeername(): %s\n", strerror(errno));
-   if (osmo_sockaddr_cmp(_osa, _osa) == 
0) {
-   LOGHNB(ctx, DHNBAP, LOGL_ERROR, "BUG! 
Found old registered HNB with same remote address, releasing it\n");
-   hnb_context_release(hnb);
-   continue;
-   }
-   } else if (osmo_sockaddr_cmp(_osa, _osa) == 
0) {
+   if (osmo_sockaddr_cmp(_osa, _osa) == 0) {
LOGHNB(ctx, DHNBAP, LOGL_ERROR, "BUG! Found old 
registered HNB with same remote address, releasing it\n");
hnb_context_release(hnb);
continue;

--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/36567?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I980de31d1296c3b956146a461609bec76ed3d430
Gerrit-Change-Number: 36567
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[S] Change in osmo-bsc[master]: lb: Log name of unhandled sigtran primitive

2024-04-16 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/36579?usp=email )

Change subject: lb: Log name of unhandled sigtran primitive
..

lb: Log name of unhandled sigtran primitive

Change-Id: I2d71fd347af404c025fc6b13e96f1964e685db05
---
M src/osmo-bsc/lb.c
1 file changed, 12 insertions(+), 2 deletions(-)

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




diff --git a/src/osmo-bsc/lb.c b/src/osmo-bsc/lb.c
index 72905b8..511a545 100644
--- a/src/osmo-bsc/lb.c
+++ b/src/osmo-bsc/lb.c
@@ -209,8 +209,9 @@
break;

default:
-   LOGP(DLCS, LOGL_ERROR, "Unhandled SIGTRAN operation %s on 
primitive %u\n",
-get_value_string(osmo_prim_op_names, oph->operation), 
oph->primitive);
+   LOGP(DLCS, LOGL_ERROR, "Unhandled SIGTRAN primitive %s.%s\n",
+osmo_scu_prim_type_name(oph->primitive),
+get_value_string(osmo_prim_op_names, oph->operation));
break;
}


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I2d71fd347af404c025fc6b13e96f1964e685db05
Gerrit-Change-Number: 36579
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[S] Change in osmo-bsc[master]: lb: Log name of unhandled sigtran primitive

2024-04-16 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/36579?usp=email )


Change subject: lb: Log name of unhandled sigtran primitive
..

lb: Log name of unhandled sigtran primitive

Change-Id: I2d71fd347af404c025fc6b13e96f1964e685db05
---
M src/osmo-bsc/lb.c
1 file changed, 12 insertions(+), 2 deletions(-)



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

diff --git a/src/osmo-bsc/lb.c b/src/osmo-bsc/lb.c
index 72905b8..511a545 100644
--- a/src/osmo-bsc/lb.c
+++ b/src/osmo-bsc/lb.c
@@ -209,8 +209,9 @@
break;

default:
-   LOGP(DLCS, LOGL_ERROR, "Unhandled SIGTRAN operation %s on 
primitive %u\n",
-get_value_string(osmo_prim_op_names, oph->operation), 
oph->primitive);
+   LOGP(DLCS, LOGL_ERROR, "Unhandled SIGTRAN primitive %s.%s\n",
+osmo_scu_prim_type_name(oph->primitive),
+get_value_string(osmo_prim_op_names, oph->operation));
break;
}


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I2d71fd347af404c025fc6b13e96f1964e685db05
Gerrit-Change-Number: 36579
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


[M] Change in libosmo-sccp[master]: ss7_asp: Update stream_cli read_cb2 functions to accommodate for new ...

2024-04-16 Thread pespin
Attention is currently required from: pespin.

Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/libosmo-sccp/+/36575?usp=email

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

The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder


Change subject: ss7_asp: Update stream_cli read_cb2 functions to accommodate 
for new API param
..

ss7_asp: Update stream_cli read_cb2 functions to accommodate for new API param

libosmo-netif (not yet released) stream_cli osmo_io read_cb API was
updated to provide read result status. Hence, now API users (ss7_asp)
can account for lower layer errors and act properly, like it used to
do with the previous ofd backend.

This commit partially reverts some error code paths removed in
9257cd896e255403822bee6f87f5487a92fd3c11 when converting code to use
osmo_io stream_cli backend.

Change-Id: I579f4101a9e2874e310ff78e4571f38cfe8dfab0
Depends: libosmo-netif.git Change-Id I395c75ff1e9904757ce1d767a9ac2f779593c4c8
---
M src/osmo_ss7_asp.c
1 file changed, 46 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/75/36575/4
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/36575?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I579f4101a9e2874e310ff78e4571f38cfe8dfab0
Gerrit-Change-Number: 36575
Gerrit-PatchSet: 4
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


[S] Change in osmo-ttcn3-hacks[master]: bsc: Early shutdown upon BSSMAP RESET-ACK timeout

2024-04-16 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36578?usp=email )


Change subject: bsc: Early shutdown upon BSSMAP RESET-ACK timeout
..

bsc: Early shutdown upon BSSMAP RESET-ACK timeout

Change-Id: I75e098d387562267d5851bc753e27e40186827ed
---
M bsc/BSC_Tests.ttcn
1 file changed, 13 insertions(+), 2 deletions(-)



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

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 1fc42ba..5e4ebbc 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -941,13 +941,15 @@
}
[] BSSAP.receive { repeat; }
[] T.timeout {
-   log("BSSMAP: Timeout waiting for RESET-ACK after 
sending RESET");
/* If we received a RESET after ours was sent, it
   may be a race condition where the other peer beacame
   available after we sent it, but we are in a desired
   state anyway, so go forward. */
if (not reset_received) {
-   setverdict(fail);
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, 
fail,
+   "BSSMAP: Timeout 
waiting for RESET-ACK after sending RESET");
+   } else {
+   log("BSSMAP: Timeout waiting for RESET-ACK 
after sending RESET");
}
}
}

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36578?usp=email
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: I75e098d387562267d5851bc753e27e40186827ed
Gerrit-Change-Number: 36578
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


[S] Change in osmo-ttcn3-hacks[master]: hnbgw: osmo-hnbgw.cfg: Update file to make it similar to the one in d...

2024-04-16 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36571?usp=email )

Change subject: hnbgw: osmo-hnbgw.cfg: Update file to make it similar to the 
one in docker-playground
..

hnbgw: osmo-hnbgw.cfg: Update file to make it similar to the one in 
docker-playground

Change-Id: I02338c4bc43e04d47c92c484532fcc48edf0222d
---
M hnbgw/osmo-hnbgw.cfg
1 file changed, 36 insertions(+), 4 deletions(-)

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




diff --git a/hnbgw/osmo-hnbgw.cfg b/hnbgw/osmo-hnbgw.cfg
index 8a9774b..2ed6905 100644
--- a/hnbgw/osmo-hnbgw.cfg
+++ b/hnbgw/osmo-hnbgw.cfg
@@ -2,18 +2,26 @@
 ! OsmoHNBGW (1.1.0) configuration saved from vty
 !!
 !
+log gsmtap 127.0.0.1
+ logging level set-all debug
+ logging filter all 1
+!
 log stderr
  logging filter all 1
- logging color 1
- logging print category-hex 1
+ logging color 0
+ logging print category-hex 0
  logging print category 1
+ logging print level 1
  logging print thread-id 0
  logging print extended-timestamp 1
- logging print file 1
+ logging print file basename last
  logging level set-all debug
 !
 line vty
  no login
+ bind 0.0.0.0
+ctrl
+ bind 0.0.0.0
 !

 stats interval 0
@@ -27,30 +35,42 @@
  enable

 cs7 instance 0
+ asp asp-clnt-msc-0 2905 2905 m3ua
+  local-ip 127.0.0.1
+  remote-ip 127.0.0.2
+  role asp
+  sctp-role client
  point-code 0.23.5
-
  sccp-address msc-naught
+  routing-indicator PC
   point-code 0.23.4

  sccp-address msc-one
+  routing-indicator PC
   point-code 0.0.2

  sccp-address msc-two
+  routing-indicator PC
   point-code 0.0.3

  sccp-address msc-three
+  routing-indicator PC
   point-code 0.0.4

  sccp-address sgsn-naught
+  routing-indicator PC
   point-code 0.23.1

  sccp-address sgsn-one
+  routing-indicator PC
   point-code 0.1.2

  sccp-address sgsn-two
+  routing-indicator PC
   point-code 0.1.3

  sccp-address sgsn-three
+  routing-indicator PC
   point-code 0.1.4

 hnbgw
@@ -59,6 +79,9 @@
   local-ip 127.0.0.1
   local-port 29169
   hnbap-allow-tmsi 1
+ mgw 0
+  mgw local-ip 127.0.0.1
+  mgw remote-ip 127.0.0.1
  # don't spam RANAP RESET messages for up to eight CN links across all tests
  timer hnbgw T4 60
  # reduce default X31 from 15 seconds

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


[S] Change in osmo-ttcn3-hacks[master]: hnbgw: TC_hnb_register_duplicate: Fix 2nd HNB_REG_REQ containing diff...

2024-04-16 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36572?usp=email )

Change subject: hnbgw: TC_hnb_register_duplicate: Fix 2nd HNB_REG_REQ 
containing different LAC
..

hnbgw: TC_hnb_register_duplicate: Fix 2nd HNB_REG_REQ containing different LAC

Change-Id: I7f5d8d8403211488966fc30bf4d82e894664df51
---
M hnbgw/HNBGW_Tests.ttcn
1 file changed, 15 insertions(+), 0 deletions(-)

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




diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn
index e28fecc..3369e37 100644
--- a/hnbgw/HNBGW_Tests.ttcn
+++ b/hnbgw/HNBGW_Tests.ttcn
@@ -980,9 +980,15 @@
 testcase TC_hnb_register_duplicate() runs on test_CT {
g_num_hnbs := 2;
f_init(start_hnb := false);
+
+   /* Make HNB REQ look as if it came from the same HnodeB (LAI+SAC),
+* but from different IP address (underlaying link): */
+   g_hnb_cfg[1] := g_hnb_cfg[0];
f_hnbap_hnb_register(0);
f_hnbap_hnb_register(1, 0, expect_reject := true);
+
f_verify_talloc_count(HNBGWVTY, {"struct hnb_context"}, expect_count := 
1);
+
f_shutdown_helper();
 }


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


[S] Change in libosmo-sccp[master]: xua_asp_fsm: Fix 'Event AS_ASSIGNED not permitted'

2024-04-16 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/36577?usp=email )


Change subject: xua_asp_fsm: Fix 'Event AS_ASSIGNED not permitted'
..

xua_asp_fsm: Fix 'Event AS_ASSIGNED not permitted'

The event case handling (ignore it) was added in a commit some time ago,
but it forgot to add it to the allstate_event_mask in the xua_fsm (it
was added only in the ipa_fsm, which is the one using it).

This bug should in theory be harmless since the only code dispatching
the signal is not checking the return code of osmo_fsm_inst_dispatch().

Related: SYS#5914
Fixes: 57444690212b1576eaf0a7156448ba2d27c59050
Change-Id: Iaead46bbc40b923763bc3dbe4d24d8952822de4a
---
M src/xua_asp_fsm.c
1 file changed, 20 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/77/36577/1

diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c
index fadcde9..97391bb 100644
--- a/src/xua_asp_fsm.c
+++ b/src/xua_asp_fsm.c
@@ -769,7 +769,8 @@
.allstate_event_mask = S(XUA_ASP_E_SCTP_COMM_DOWN_IND) |
   S(XUA_ASP_E_SCTP_RESTART_IND) |
   S(XUA_ASP_E_ASPSM_BEAT) |
-  S(XUA_ASP_E_ASPSM_BEAT_ACK),
+  S(XUA_ASP_E_ASPSM_BEAT_ACK) |
+  S(XUA_ASP_E_AS_ASSIGNED),
.allstate_action = xua_asp_allstate,
.cleanup = xua_asp_fsm_cleanup,
 };

--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/36577?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: Iaead46bbc40b923763bc3dbe4d24d8952822de4a
Gerrit-Change-Number: 36577
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


[S] Change in osmo-bsc[master]: cbsp_link.c: Update stream_cli read_cb2 functions to accommodate for ...

2024-04-16 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/36576?usp=email )


Change subject: cbsp_link.c: Update stream_cli read_cb2 functions to 
accommodate for new API param
..

cbsp_link.c: Update stream_cli read_cb2 functions to accommodate for new API 
param

libosmo-netif (not yet released) stream_cli osmo_io read_cb API was
updated to provide read result status. Hence, now API users
can account for lower layer errors and act properly, like it used to
do with the previous ofd backend.

This commit partially reverts some error code paths removed in
85687bf176e4b9663f2396a27c28b49221c72fa3 when converting code to use
osmo_io stream_cli backend.

Change-Id: I4cce5cb6ca98bc28a67dd6e927e9cdfd2312851a
Depends: libosmo-netif.git Change-Id I395c75ff1e9904757ce1d767a9ac2f779593c4c8
---
M src/osmo-bsc/cbsp_link.c
1 file changed, 37 insertions(+), 1 deletion(-)



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

diff --git a/src/osmo-bsc/cbsp_link.c b/src/osmo-bsc/cbsp_link.c
index 98f25d3..20206e2 100644
--- a/src/osmo-bsc/cbsp_link.c
+++ b/src/osmo-bsc/cbsp_link.c
@@ -148,11 +148,28 @@
return 0;
 }

-static int cbsp_client_read_cb(struct osmo_stream_cli *cli, struct msgb *msg)
+static int cbsp_client_read_cb(struct osmo_stream_cli *cli, int res, struct 
msgb *msg)
 {
struct bsc_cbc_link *cbc = osmo_stream_cli_get_data(cli);
struct osmo_cbsp_decoded *decoded;

+   if (res <= 0) {
+   if (res == -EAGAIN || res == -EINTR) {
+   msgb_free(msg);
+   return 0;
+   }
+   /*
+   if (rc == -EPIPE || rc == -ECONNRESET) {
+   // lost connection
+   } else if (rc == 0) {
+   // connection closed
+   } */
+   osmo_stream_cli_reconnect(cli);
+   msgb_free(msg);
+   return -EBADF;
+   }
+
+
OSMO_ASSERT(msg);
decoded = osmo_cbsp_decode(cli, msg);
if (decoded) {

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I4cce5cb6ca98bc28a67dd6e927e9cdfd2312851a
Gerrit-Change-Number: 36576
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


[M] Change in libosmo-netif[master]: stream_cli: Add res param to read_cb2

2024-04-16 Thread pespin
Attention is currently required from: fixeria, jolly, laforge.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/36574?usp=email )

Change subject: stream_cli: Add res param to read_cb2
..


Patch Set 1: Code-Review-2

(1 comment)

Patchset:

PS1:
I still need to run some tests against this patch and the ones using them 
(libosmo-sccp, osmo-bsc), marking as WIP until then.

Help testing welcome.



--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/36574?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I395c75ff1e9904757ce1d767a9ac2f779593c4c8
Gerrit-Change-Number: 36574
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: jolly 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: jolly 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Tue, 16 Apr 2024 17:45:24 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in libosmo-sccp[master]: ss7_asp: Update stream_cli read_cb2 functions to accommodate for new ...

2024-04-16 Thread pespin
Attention is currently required from: pespin.

Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/libosmo-sccp/+/36575?usp=email

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


Change subject: ss7_asp: Update stream_cli read_cb2 functions to accommodate 
for new API param
..

ss7_asp: Update stream_cli read_cb2 functions to accommodate for new API param

libosmo-netif (not yet released) stream_cli osmo_io read_cb API was
updated to provide read result status. Hence, now API users (ss7_asp)
can account for lower layer errors and act properly, like it used to
do with the previous ofd backend.

This commit partially reverts some error code paths removed in
9257cd896e255403822bee6f87f5487a92fd3c11 when converting code to use
osmo_io stream_cli backend.

Change-Id: I579f4101a9e2874e310ff78e4571f38cfe8dfab0
Depends: libosmo-netif.git Change-Id I395c75ff1e9904757ce1d767a9ac2f779593c4c8
---
M src/osmo_ss7_asp.c
1 file changed, 47 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/75/36575/3
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/36575?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I579f4101a9e2874e310ff78e4571f38cfe8dfab0
Gerrit-Change-Number: 36575
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


[M] Change in libosmo-sccp[master]: ss7_asp: Update stream_cli read_cb2 functions to accommodate for new ...

2024-04-16 Thread pespin
pespin has uploaded a new patch set (#2). ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/36575?usp=email )


Change subject: ss7_asp: Update stream_cli read_cb2 functions to accommodate 
for new API param
..

ss7_asp: Update stream_cli read_cb2 functions to accommodate for new API param

libosmo-netif (not yet released) stream_cli osmo_io read_cb API was
updated to provide read result status. Hence, now API users (ss/ asp)
can now account for lower layer errors and act properly, like it used to
do with the previous ofd backend.

This commit partially reverts some error code paths removed in
9257cd896e255403822bee6f87f5487a92fd3c11 when converting code to use
osmo_io stream_cli backend.

Change-Id: I579f4101a9e2874e310ff78e4571f38cfe8dfab0
Depends: libosmo-netif.git Change-Id I395c75ff1e9904757ce1d767a9ac2f779593c4c8
---
M src/osmo_ss7_asp.c
1 file changed, 47 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/75/36575/2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/36575?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I579f4101a9e2874e310ff78e4571f38cfe8dfab0
Gerrit-Change-Number: 36575
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-CC: Jenkins Builder
Gerrit-MessageType: newpatchset


[M] Change in libosmo-sccp[master]: ss7_asp: Update stream_cli read_cb2 functions to accomodate for new A...

2024-04-16 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/36575?usp=email )


Change subject: ss7_asp: Update stream_cli read_cb2 functions to accomodate for 
new API param
..

ss7_asp: Update stream_cli read_cb2 functions to accomodate for new API param

libosmo-netif (not yet released) stream_cli osmo_io read_cb API was
updated to provide read result status. Hence, now API users (ss/ asp)
can now account for lower layer errors and act properly, like it used to
do with the previous ofd backend.

This commit partially reverts some error code paths removed in
9257cd896e255403822bee6f87f5487a92fd3c11 when converting code to use
osmo_io stream_cli backend.

Change-Id: I579f4101a9e2874e310ff78e4571f38cfe8dfab0
Depends: libosmo-netif.git Change-Id I395c75ff1e9904757ce1d767a9ac2f779593c4c8
---
M src/osmo_ss7_asp.c
1 file changed, 47 insertions(+), 7 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/75/36575/1

diff --git a/src/osmo_ss7_asp.c b/src/osmo_ss7_asp.c
index 90c72a9..6221d7b 100644
--- a/src/osmo_ss7_asp.c
+++ b/src/osmo_ss7_asp.c
@@ -602,9 +602,9 @@
talloc_free(asp);
 }

-static int xua_cli_read_cb(struct osmo_stream_cli *conn, struct msgb *msg);
-static int ipa_cli_read_cb(struct osmo_stream_cli *conn, struct msgb *msg);
-static int m3ua_tcp_cli_read_cb(struct osmo_stream_cli *conn, struct msgb 
*msg);
+static int xua_cli_read_cb(struct osmo_stream_cli *conn, int res, struct msgb 
*msg);
+static int ipa_cli_read_cb(struct osmo_stream_cli *conn, int res, struct msgb 
*msg);
+static int m3ua_tcp_cli_read_cb(struct osmo_stream_cli *conn, int res, struct 
msgb *msg);
 static int xua_cli_connect_cb(struct osmo_stream_cli *cli);
 static int xua_cli_close_and_reconnect(struct osmo_stream_cli *cli);

@@ -953,11 +953,21 @@
 }

 /* read call-back for IPA/SCCPlite socket */
-static int ipa_cli_read_cb(struct osmo_stream_cli *conn, struct msgb *msg)
+static int ipa_cli_read_cb(struct osmo_stream_cli *conn, int res, struct msgb 
*msg)
 {
int fd = osmo_stream_cli_get_fd(conn);
struct osmo_ss7_asp *asp = osmo_stream_cli_get_data(conn);

+   if (res <= 0) {
+   if (res == -EAGAIN) {
+   msgb_free(msg);
+   return 0;
+   }
+   xua_cli_close_and_reconnect(conn);
+   msgb_free(msg);
+   return res;
+   }
+
msg->dst = asp;
rate_ctr_inc2(asp->ctrg, SS7_ASP_CTR_PKT_RX_TOTAL);
/* we can use the 'fd' return value of osmo_stream_srv_get_fd() here 
unverified as all we do
@@ -966,7 +976,7 @@
 }

 /* read call-back for M3UA-over-TCP socket */
-static int m3ua_tcp_cli_read_cb(struct osmo_stream_cli *conn, struct msgb *msg)
+static int m3ua_tcp_cli_read_cb(struct osmo_stream_cli *conn, int res, struct 
msgb *msg)
 {
const struct xua_common_hdr *hdr;
 
@@ -980,10 +990,10 @@
else
msgb_sctp_stream(msg) = 0;

-   return xua_cli_read_cb(conn, msg);
+   return xua_cli_read_cb(conn, res, msg);
 }

-static int xua_cli_read_cb(struct osmo_stream_cli *conn, struct msgb *msg)
+static int xua_cli_read_cb(struct osmo_stream_cli *conn, int res, struct msgb 
*msg)
 {
struct osmo_ss7_asp *asp = osmo_stream_cli_get_data(conn);
unsigned int ppid;
@@ -1008,6 +1018,17 @@
default:
break;
}
+   if (rc == 0)
+   xua_cli_close_and_reconnect(conn);
+   rc = 0;
+   goto out;
+   }
+   if (rc < 0) {
+   xua_cli_close_and_reconnect(conn);
+   goto out;
+   } else if (rc == 0) {
+   xua_cli_close_and_reconnect(conn);
+
goto out;
}


--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/36575?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I579f4101a9e2874e310ff78e4571f38cfe8dfab0
Gerrit-Change-Number: 36575
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


[M] Change in libosmo-netif[master]: stream_cli: Add res param to read_cb2

2024-04-16 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/36574?usp=email )


Change subject: stream_cli: Add res param to read_cb2
..

stream_cli: Add res param to read_cb2

Notify user about read errors, similar to what is supported in the
earlier ofd cb backend of osmo_stream_cli:
https://osmocom.org/issues/6405#note-15

Related: OS#6405
Fixes: 5fec34a9f20c3b8769373d1b28ae2062e5e2bdd6
Fixes: 0245cf5e07855abea72693272c55b50b5a93aff4
Change-Id: I395c75ff1e9904757ce1d767a9ac2f779593c4c8
---
M examples/ipa-stream-client.c
M examples/stream-client.c
M include/osmocom/netif/stream.h
M src/stream_cli.c
M tests/stream/stream_test.c
5 files changed, 74 insertions(+), 16 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/74/36574/1

diff --git a/examples/ipa-stream-client.c b/examples/ipa-stream-client.c
index 720fe66..b58370e 100644
--- a/examples/ipa-stream-client.c
+++ b/examples/ipa-stream-client.c
@@ -102,13 +102,19 @@
return 0;
 }

-static int read_cb(struct osmo_stream_cli *conn, struct msgb *msg)
+static int read_cb(struct osmo_stream_cli *conn, int res, struct msgb *msg)
 {
int num;
struct msg_sent *cur, *tmp, *found = NULL;

LOGP(DIPATEST, LOGL_DEBUG, "received message from stream (payload 
len=%d)\n", msgb_length(msg));

+   if (res <= 0) {
+   LOGP(DIPATEST, LOGL_ERROR, "Event with no data! %d\n", res);
+   msgb_free(msg);
+   return 0;
+   }
+
if (osmo_ipa_process_msg(msg) < 0) {
LOGP(DIPATEST, LOGL_ERROR, "bad IPA message\n");
msgb_free(msg);
diff --git a/examples/stream-client.c b/examples/stream-client.c
index cae0153..6d20263 100644
--- a/examples/stream-client.c
+++ b/examples/stream-client.c
@@ -54,10 +54,17 @@
return 0;
 }

-static int read_cb(struct osmo_stream_cli *conn, struct msgb *msg)
+static int read_cb(struct osmo_stream_cli *conn, int res, struct msgb *msg)
 {
LOGP(DSTREAMTEST, LOGL_NOTICE, "receiving message from stream... ");

+   if (res < 0) {
+   LOGPC(DSTREAMTEST, LOGL_ERROR, "cannot receive message (res = 
%d)\n", res);
+   msgb_free(msg);
+   return 0;
+   }
+
+
LOGPC(DSTREAMTEST, LOGL_NOTICE, "got %d bytes: %s\n", msg->len, 
msgb_hexdump(msg));

msgb_free(msg);
diff --git a/include/osmocom/netif/stream.h b/include/osmocom/netif/stream.h
index 61bc1ad..b680b61 100644
--- a/include/osmocom/netif/stream.h
+++ b/include/osmocom/netif/stream.h
@@ -160,6 +160,13 @@
 /*! \brief Osmocom Stream Client: Single client connection */
 struct osmo_stream_cli;

+/*! Completion call-back function when something was read from from the stream 
client socket.
+ * \param[in] cli Stream Client that got receive event.
+ * \param[in] res return value of the read()/recvmsg()/... call, or -errno in 
case of error.
+ * \param[in] msg message buffer containing the read data. Ownership is 
transferred to the
+ * call-back, and it must make sure to msgb_free() it eventually! */
+typedef int (*osmo_stream_cli_read_cb2_t)(struct osmo_stream_cli *cli, int 
res, struct msgb *msg);
+
 void osmo_stream_cli_set_name(struct osmo_stream_cli *cli, const char *name);
 const char *osmo_stream_cli_get_name(const struct osmo_stream_cli *cli);
 void osmo_stream_cli_set_nodelay(struct osmo_stream_cli *cli, bool nodelay);
@@ -182,7 +189,7 @@
 void osmo_stream_cli_set_connect_cb(struct osmo_stream_cli *cli, int 
(*connect_cb)(struct osmo_stream_cli *cli));
 void osmo_stream_cli_set_disconnect_cb(struct osmo_stream_cli *cli, int 
(*disconnect_cb)(struct osmo_stream_cli *cli));
 void osmo_stream_cli_set_read_cb(struct osmo_stream_cli *cli, int 
(*read_cb)(struct osmo_stream_cli *cli));
-void osmo_stream_cli_set_read_cb2(struct osmo_stream_cli *cli, int 
(*read_cb)(struct osmo_stream_cli *cli, struct msgb *msg));
+void osmo_stream_cli_set_read_cb2(struct osmo_stream_cli *cli, 
osmo_stream_cli_read_cb2_t read_cb);
 void osmo_stream_cli_set_segmentation_cb(struct osmo_stream_cli *cli, int 
(*segmentation_cb)(struct msgb *msg));
 void osmo_stream_cli_reconnect(struct osmo_stream_cli *cli);
 bool osmo_stream_cli_is_connected(struct osmo_stream_cli *cli);
diff --git a/src/stream_cli.c b/src/stream_cli.c
index 11c88ae..0e47bb8 100644
--- a/src/stream_cli.c
+++ b/src/stream_cli.c
@@ -106,7 +106,7 @@
int (*connect_cb)(struct osmo_stream_cli *cli);
int (*disconnect_cb)(struct osmo_stream_cli *cli);
int (*read_cb)(struct osmo_stream_cli *cli);
-   int (*iofd_read_cb)(struct osmo_stream_cli *cli, struct msgb *msg);
+   osmo_stream_cli_read_cb2_t iofd_read_cb;
int (*write_cb)(struct osmo_stream_cli *cli);
int (*segmentation_cb)(struct msgb *msg);
void*data;
@@ 

[S] Change in libosmo-netif[master]: examples/ipa-stream-client: Fix memleaks in read_cb()

2024-04-16 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/36573?usp=email )


Change subject: examples/ipa-stream-client: Fix memleaks in read_cb()
..

examples/ipa-stream-client: Fix memleaks in read_cb()

Change-Id: I86fc159d928fc7ebce2f771670c5a198c52f5fc0
---
M examples/ipa-stream-client.c
1 file changed, 14 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/73/36573/1

diff --git a/examples/ipa-stream-client.c b/examples/ipa-stream-client.c
index cb07ef6..720fe66 100644
--- a/examples/ipa-stream-client.c
+++ b/examples/ipa-stream-client.c
@@ -104,16 +104,17 @@

 static int read_cb(struct osmo_stream_cli *conn, struct msgb *msg)
 {
+   int num;
+   struct msg_sent *cur, *tmp, *found = NULL;
+
LOGP(DIPATEST, LOGL_DEBUG, "received message from stream (payload 
len=%d)\n", msgb_length(msg));
 
if (osmo_ipa_process_msg(msg) < 0) {
LOGP(DIPATEST, LOGL_ERROR, "bad IPA message\n");
+   msgb_free(msg);
return 0;
}

-   int num;
-   struct msg_sent *cur, *tmp, *found = NULL;
-
num = osmo_load32be(msg->data);
LOGP(DLINP, LOGL_DEBUG, "received msg number %d\n", num);

@@ -137,6 +138,7 @@
LOGP(DLINP, LOGL_ERROR,
"message %d not found!\n", num);
}
+   msgb_free(msg);
return 0;
 }


--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/36573?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I86fc159d928fc7ebce2f771670c5a198c52f5fc0
Gerrit-Change-Number: 36573
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


[S] Change in osmo-ttcn3-hacks[master]: hnbgw: osmo-hnbgw.cfg: Update file to make it similar to the one in d...

2024-04-16 Thread pespin
Attention is currently required from: laforge.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36571?usp=email )

Change subject: hnbgw: osmo-hnbgw.cfg: Update file to make it similar to the 
one in docker-playground
..


Patch Set 2:

(1 comment)

Commit Message:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36571/comment/eb0e67ef_afb9f1b3
PS1, Line 7: hnbgw: osmo-hnbgw.cfg: Update filet to make it similar to the one 
in docker-playground
> filet mignon? SCNR.
Done



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36571?usp=email
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: I02338c4bc43e04d47c92c484532fcc48edf0222d
Gerrit-Change-Number: 36571
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Tue, 16 Apr 2024 16:09:09 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment


[S] Change in osmo-ttcn3-hacks[master]: hnbgw: osmo-hnbgw.cfg: Update file to make it similar to the one in d...

2024-04-16 Thread pespin
Attention is currently required from: laforge, pespin.

Hello Jenkins Builder, laforge,

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

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36571?usp=email

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

The following approvals got outdated and were removed:
Code-Review+1 by laforge


Change subject: hnbgw: osmo-hnbgw.cfg: Update file to make it similar to the 
one in docker-playground
..

hnbgw: osmo-hnbgw.cfg: Update file to make it similar to the one in 
docker-playground

Change-Id: I02338c4bc43e04d47c92c484532fcc48edf0222d
---
M hnbgw/osmo-hnbgw.cfg
1 file changed, 36 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/71/36571/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36571?usp=email
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: I02338c4bc43e04d47c92c484532fcc48edf0222d
Gerrit-Change-Number: 36571
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


[S] Change in osmo-ttcn3-hacks[master]: hnbgw: Add new recent tests to expected-results.xml

2024-04-16 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36566?usp=email )

Change subject: hnbgw: Add new recent tests to expected-results.xml
..

hnbgw: Add new recent tests to expected-results.xml

Change-Id: I317773de2a38b37e5b8c7f12ff4be9c4a9b8fbce
---
M hnbgw/expected-results.xml
1 file changed, 14 insertions(+), 0 deletions(-)

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




diff --git a/hnbgw/expected-results.xml b/hnbgw/expected-results.xml
index a48c232..5f39bc5 100644
--- a/hnbgw/expected-results.xml
+++ b/hnbgw/expected-results.xml
@@ -3,6 +3,10 @@
   
   
   
+  
+  
+  
+  
   
   
   
@@ -11,6 +15,7 @@
   
   
   
+  
   
   
   

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


[S] Change in osmo-ttcn3-hacks[master]: hnbgw: TC_hnb_register_duplicate: Fix 2nd HNB_REG_REQ containing diff...

2024-04-16 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36572?usp=email )


Change subject: hnbgw: TC_hnb_register_duplicate: Fix 2nd HNB_REG_REQ 
containing different LAC
..

hnbgw: TC_hnb_register_duplicate: Fix 2nd HNB_REG_REQ containing different LAC

Change-Id: I7f5d8d8403211488966fc30bf4d82e894664df51
---
M hnbgw/HNBGW_Tests.ttcn
1 file changed, 15 insertions(+), 0 deletions(-)



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

diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn
index e28fecc..3369e37 100644
--- a/hnbgw/HNBGW_Tests.ttcn
+++ b/hnbgw/HNBGW_Tests.ttcn
@@ -980,9 +980,15 @@
 testcase TC_hnb_register_duplicate() runs on test_CT {
g_num_hnbs := 2;
f_init(start_hnb := false);
+
+   /* Make HNB REQ look as if it came from the same HnodeB (LAI+SAC),
+* but from different IP address (underlaying link): */
+   g_hnb_cfg[1] := g_hnb_cfg[0];
f_hnbap_hnb_register(0);
f_hnbap_hnb_register(1, 0, expect_reject := true);
+
f_verify_talloc_count(HNBGWVTY, {"struct hnb_context"}, expect_count := 
1);
+
f_shutdown_helper();
 }


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36572?usp=email
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: I7f5d8d8403211488966fc30bf4d82e894664df51
Gerrit-Change-Number: 36572
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


[S] Change in libosmo-netif[master]: stream_cli.c: Handle read / recvfrom error and close connection

2024-04-16 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/36354?usp=email )

Change subject: stream_cli.c: Handle read / recvfrom error and close connection
..


Patch Set 3:

(1 comment)

Patchset:

PS3:
https://osmocom.org/issues/6405#note-15



--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/36354?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I55426de6b49cb4cb0797e50dfeae11f2efc29b15
Gerrit-Change-Number: 36354
Gerrit-PatchSet: 3
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-CC: fixeria 
Gerrit-Comment-Date: Tue, 16 Apr 2024 15:41:29 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in libosmo-netif[master]: Do not reconnect when receiving SCTP notification

2024-04-16 Thread pespin
Attention is currently required from: jolly.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/36568?usp=email )

Change subject: Do not reconnect when receiving SCTP notification
..


Patch Set 1:

(1 comment)

Patchset:

PS1:
https://osmocom.org/issues/6405#note-15



--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/36568?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ic588e6d8a3eecde701778f7d6ff5599ab81eff2b
Gerrit-Change-Number: 36568
Gerrit-PatchSet: 1
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Tue, 16 Apr 2024 15:41:23 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in osmo-ttcn3-hacks[master]: hnbgw: osmo-hnbgw.cfg: Update filet to make it similar to the one in ...

2024-04-16 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36571?usp=email )


Change subject: hnbgw: osmo-hnbgw.cfg: Update filet to make it similar to the 
one in docker-playground
..

hnbgw: osmo-hnbgw.cfg: Update filet to make it similar to the one in 
docker-playground

Change-Id: I02338c4bc43e04d47c92c484532fcc48edf0222d
---
M hnbgw/osmo-hnbgw.cfg
1 file changed, 36 insertions(+), 4 deletions(-)



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

diff --git a/hnbgw/osmo-hnbgw.cfg b/hnbgw/osmo-hnbgw.cfg
index 8a9774b..2ed6905 100644
--- a/hnbgw/osmo-hnbgw.cfg
+++ b/hnbgw/osmo-hnbgw.cfg
@@ -2,18 +2,26 @@
 ! OsmoHNBGW (1.1.0) configuration saved from vty
 !!
 !
+log gsmtap 127.0.0.1
+ logging level set-all debug
+ logging filter all 1
+!
 log stderr
  logging filter all 1
- logging color 1
- logging print category-hex 1
+ logging color 0
+ logging print category-hex 0
  logging print category 1
+ logging print level 1
  logging print thread-id 0
  logging print extended-timestamp 1
- logging print file 1
+ logging print file basename last
  logging level set-all debug
 !
 line vty
  no login
+ bind 0.0.0.0
+ctrl
+ bind 0.0.0.0
 !

 stats interval 0
@@ -27,30 +35,42 @@
  enable

 cs7 instance 0
+ asp asp-clnt-msc-0 2905 2905 m3ua
+  local-ip 127.0.0.1
+  remote-ip 127.0.0.2
+  role asp
+  sctp-role client
  point-code 0.23.5
-
  sccp-address msc-naught
+  routing-indicator PC
   point-code 0.23.4

  sccp-address msc-one
+  routing-indicator PC
   point-code 0.0.2

  sccp-address msc-two
+  routing-indicator PC
   point-code 0.0.3

  sccp-address msc-three
+  routing-indicator PC
   point-code 0.0.4

  sccp-address sgsn-naught
+  routing-indicator PC
   point-code 0.23.1

  sccp-address sgsn-one
+  routing-indicator PC
   point-code 0.1.2

  sccp-address sgsn-two
+  routing-indicator PC
   point-code 0.1.3

  sccp-address sgsn-three
+  routing-indicator PC
   point-code 0.1.4

 hnbgw
@@ -59,6 +79,9 @@
   local-ip 127.0.0.1
   local-port 29169
   hnbap-allow-tmsi 1
+ mgw 0
+  mgw local-ip 127.0.0.1
+  mgw remote-ip 127.0.0.1
  # don't spam RANAP RESET messages for up to eight CN links across all tests
  timer hnbgw T4 60
  # reduce default X31 from 15 seconds

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36571?usp=email
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: I02338c4bc43e04d47c92c484532fcc48edf0222d
Gerrit-Change-Number: 36571
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


  1   2   3   4   5   6   7   8   9   10   >