[S] Change in osmo-msc[master]: SDP/MGCP: pass octet-align=1 for AMR / pass all fmtp

2024-01-24 Thread osmith
Attention is currently required from: fixeria, neels, pespin.

osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/35307?usp=email )

Change subject: SDP/MGCP: pass octet-align=1 for AMR / pass all fmtp
..


Patch Set 3:

(1 comment)

File configure.ac:

https://gerrit.osmocom.org/c/osmo-msc/+/35307/comment/519b1ac7_5c305e1f
PS3, Line 48: PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 
1.13.0)
> now this ... […]
yes. just mention it in the TODO-RELEASE, and don't change the 
PKG_CHECK_MODULES line in configure.ac, doing that is part of the release 
process.

https://osmocom.org/projects/cellular-infrastructure/wiki/Make_a_new_release#How-to-make-a-new-release



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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ief9225c9bcf7525a9a0a07c282ffb8cc0d092186
Gerrit-Change-Number: 35307
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-CC: osmith 
Gerrit-Attention: neels 
Gerrit-Attention: fixeria 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Thu, 25 Jan 2024 07:47:13 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels 
Gerrit-MessageType: comment


[M] Change in libosmocore[master]: isdn/v110_ta: avoid redundant .status_update_cb() calls

2024-01-24 Thread osmith
Attention is currently required from: fixeria, laforge.

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

Change subject: isdn/v110_ta: avoid redundant .status_update_cb() calls
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35639?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: I9626d3e737d4e072fa163115c4cdf9ee6ee0968e
Gerrit-Change-Number: 35639
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Thu, 25 Jan 2024 07:44:55 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[L] Change in osmo-ttcn3-hacks[master]: DIAMETER: Split Gy and Gx messages to their own TS files

2024-01-24 Thread osmith
Attention is currently required from: jolly, lynxis lazus, pespin.

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

Change subject: DIAMETER: Split Gy and Gx messages to their own TS files
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35671?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: Ibe0d5f263813d5083e020c942283f214983162b4
Gerrit-Change-Number: 35671
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: osmith 
Gerrit-Attention: jolly 
Gerrit-Attention: pespin 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Thu, 25 Jan 2024 07:37:59 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-sip-connector[master]: verbosely log MNCC and SDP

2024-01-24 Thread neels
neels has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-sip-connector/+/35308?usp=email )

Change subject: verbosely log MNCC and SDP
..

verbosely log MNCC and SDP

Change-Id: Ie923117929c6b79b1eb61e5a9f02a169edabc599
---
M src/mncc.c
M src/sdp.c
M src/sip.c
3 files changed, 68 insertions(+), 8 deletions(-)

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




diff --git a/src/mncc.c b/src/mncc.c
index ed36085..12cc359 100644
--- a/src/mncc.c
+++ b/src/mncc.c
@@ -134,12 +134,14 @@
 {
int rc;

+   LOGP(DMNCC, LOGL_DEBUG, "tx MNCC %s with SDP=%s\n", 
osmo_mncc_name(mncc->msg_type),
+osmo_quote_str(mncc->sdp, -1));
+
/*
 * TODO: we need to put cause in here for release or such? shall we 
return a
 * static struct?
 */
rc = write(conn->fd.fd, mncc, sizeof(*mncc));
-   LOGP(DMNCC, LOGL_DEBUG, "MNCC sent message type: %s\n", 
osmo_mncc_name(mncc->msg_type));
if (rc != sizeof(*mncc)) {
LOGP(DMNCC, LOGL_ERROR, "Failed to send message for 
call(%u)\n", mncc->callref);
close_connection(conn);
@@ -160,8 +162,10 @@
 {
int rc;

+   LOGP(DMNCC, LOGL_DEBUG, "tx MNCC %s with SDP=%s\n", 
osmo_mncc_name(rtp->msg_type),
+osmo_quote_str(rtp->sdp, -1));
+
rc = write(conn->fd.fd, rtp, sizeof(*rtp));
-   LOGP(DMNCC, LOGL_DEBUG, "MNCC sent message type: %s\n", 
osmo_mncc_name(rtp->msg_type));
if (rc != sizeof(*rtp)) {
LOGP(DMNCC, LOGL_ERROR, "Failed to send message for call(%u): 
%d\n", rtp->callref, rc);
close_connection(conn);
@@ -1028,6 +1032,53 @@
conn->state = MNCC_WAIT_VERSION;
 }

+static inline void log_mncc(const char *label, const uint8_t *buf, size_t 
buflen)
+{
+   uint32_t msg_type;
+   const struct gsm_mncc *gsm_mncc;
+   const struct gsm_mncc_rtp *gsm_mncc_rtp;
+   const char *sdp = NULL;
+
+   /* Any size errors will be logged elsewhere already, so just exit here 
if the buffer is too small. */
+   if (buflen < 4)
+   return;
+   memcpy(_type, buf, 4);
+
+   switch (msg_type) {
+   case MNCC_SETUP_IND:
+   case MNCC_DISC_IND:
+   case MNCC_REL_IND:
+   case MNCC_REJ_IND:
+   case MNCC_REL_CNF:
+   case MNCC_SETUP_COMPL_IND:
+   case MNCC_SETUP_CNF:
+   case MNCC_CALL_CONF_IND:
+   case MNCC_ALERT_IND:
+   case MNCC_HOLD_IND:
+   case MNCC_RETRIEVE_IND:
+   if (buflen < sizeof(gsm_mncc))
+   return;
+   gsm_mncc = (void *)buf;
+   sdp = gsm_mncc->sdp;
+   break;
+   case MNCC_RTP_CREATE:
+   case MNCC_RTP_CONNECT:
+   if (buflen < sizeof(gsm_mncc_rtp))
+   return;
+   gsm_mncc_rtp = (void *)buf;
+   sdp = gsm_mncc_rtp->sdp;
+   break;
+
+   default:
+   break;
+   }
+   if (sdp)
+   LOGP(DMNCC, LOGL_DEBUG, "%sMNCC %s with SDP=%s\n", label, 
osmo_mncc_name(msg_type),
+osmo_quote_str(sdp, -1));
+   else
+   LOGP(DMNCC, LOGL_DEBUG, "%sMNCC %s\n", label, 
osmo_mncc_name(msg_type));
+}
+
 /* osmo-fd read call-back for MNCC socket: read MNCC message + dispatch it */
 static int mncc_data(struct osmo_fd *fd, unsigned int what)
 {
@@ -1047,10 +1098,10 @@
goto bad_data;
}

+   log_mncc("rx ", (void *)buf, rc);
+
+   /* Handle the received MNCC message */
memcpy(_type, buf, 4);
-
-   LOGP(DMNCC, LOGL_DEBUG, "MNCC rcvd message type: %s\n", 
osmo_mncc_name(msg_type));
-
switch (msg_type) {
case MNCC_SOCKET_HELLO:
check_hello(conn, buf, rc);
diff --git a/src/sdp.c b/src/sdp.c
index 7e632c3..ed57031 100644
--- a/src/sdp.c
+++ b/src/sdp.c
@@ -322,7 +322,7 @@

sdp = sdp_session(parser);
if (!sdp) {
-   LOGP(DSIP, LOGL_ERROR, "leg(%p) no sdp session\n", other);
+   LOGP(DSIP, LOGL_INFO, "leg(%p) no SDP session in %s, returning 
SDP unchanged\n", other, osmo_quote_str(sdp_data, -1));
sdp_parser_free(parser);
return talloc_strdup(leg, sdp_data);
}
diff --git a/src/sip.c b/src/sip.c
index 0c8130f..99bab9f 100644
--- a/src/sip.c
+++ b/src/sip.c
@@ -358,8 +358,8 @@

 void nua_callback(nua_event_t event, int status, char const *phrase, nua_t 
*nua, nua_magic_t *magic, nua_handle_t *nh, nua_hmagic_t *hmagic, sip_t const 
*sip, tagi_t tags[])
 {
-   LOGP(DSIP, LOGL_DEBUG, "SIP event[%s] status(%d) phrase(%s) %p\n",
-   nua_event_name(event), status, phrase, hmagic);
+   LOGP(DSIP, LOGL_DEBUG, "SIP event[%s] status(%d) phrase(%s) SDP(%s) 
%p\n",
+   nua_event_name(event), status, phrase, sip_get_sdp(sip), 
hmagic);

if (event == nua_r_invite) {
  

[M] Change in osmo-sip-connector[master]: verbosely log MNCC and SDP

2024-01-24 Thread neels
Attention is currently required from: fixeria, laforge, pespin.

neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sip-connector/+/35308?usp=email )

Change subject: verbosely log MNCC and SDP
..


Patch Set 5: Code-Review+2


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

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-Change-Id: Ie923117929c6b79b1eb61e5a9f02a169edabc599
Gerrit-Change-Number: 35308
Gerrit-PatchSet: 5
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-CC: fixeria 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Thu, 25 Jan 2024 01:56:26 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-sip-connector[master]: verbosely log MNCC and SDP

2024-01-24 Thread neels
Attention is currently required from: fixeria, laforge, neels, pespin.

Hello Jenkins Builder, laforge, pespin,

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

https://gerrit.osmocom.org/c/osmo-sip-connector/+/35308?usp=email

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

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


Change subject: verbosely log MNCC and SDP
..

verbosely log MNCC and SDP

Change-Id: Ie923117929c6b79b1eb61e5a9f02a169edabc599
---
M src/mncc.c
M src/sdp.c
M src/sip.c
3 files changed, 68 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-sip-connector 
refs/changes/08/35308/5
--
To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/35308?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-Change-Id: Ie923117929c6b79b1eb61e5a9f02a169edabc599
Gerrit-Change-Number: 35308
Gerrit-PatchSet: 5
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-CC: fixeria 
Gerrit-Attention: neels 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-MessageType: newpatchset


[M] Change in osmo-sip-connector[master]: verbosely log MNCC and SDP

2024-01-24 Thread neels
Attention is currently required from: fixeria, laforge, neels, pespin.

neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sip-connector/+/35308?usp=email )

Change subject: verbosely log MNCC and SDP
..


Patch Set 4: Code-Review+2


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

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-Change-Id: Ie923117929c6b79b1eb61e5a9f02a169edabc599
Gerrit-Change-Number: 35308
Gerrit-PatchSet: 4
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-CC: fixeria 
Gerrit-Attention: neels 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Thu, 25 Jan 2024 01:54:35 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-sip-connector[master]: verbosely log MNCC and SDP

2024-01-24 Thread Jenkins Builder
Attention is currently required from: fixeria, laforge, neels, pespin.

Jenkins Builder has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sip-connector/+/35308?usp=email )

Change subject: verbosely log MNCC and SDP
..


Patch Set 4:

(1 comment)

File src/mncc.c:

Robot Comment from checkpatch (run ID jenkins-gerrit-lint-13836):
https://gerrit.osmocom.org/c/osmo-sip-connector/+/35308/comment/69a6a3c1_5ec33812
PS4, Line 1101: log_mncc("rx ", (void*)buf, rc);
"(foo*)" should be "(foo *)"



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

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-Change-Id: Ie923117929c6b79b1eb61e5a9f02a169edabc599
Gerrit-Change-Number: 35308
Gerrit-PatchSet: 4
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-CC: fixeria 
Gerrit-Attention: neels 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Thu, 25 Jan 2024 01:53:30 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[M] Change in osmo-sip-connector[master]: verbosely log MNCC and SDP

2024-01-24 Thread neels
Attention is currently required from: fixeria, laforge, pespin.

neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sip-connector/+/35308?usp=email )

Change subject: verbosely log MNCC and SDP
..


Patch Set 3:

(1 comment)

File src/mncc.c:

https://gerrit.osmocom.org/c/osmo-sip-connector/+/35308/comment/0e027206_28527391
PS2, Line 1059: Log about the received MNCC message
> For sure not 2, that would be taking a mutex twice instead of once.
Done



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

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-Change-Id: Ie923117929c6b79b1eb61e5a9f02a169edabc599
Gerrit-Change-Number: 35308
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-CC: fixeria 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Thu, 25 Jan 2024 01:53:17 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Comment-In-Reply-To: pespin 
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


[M] Change in osmo-sip-connector[master]: verbosely log MNCC and SDP

2024-01-24 Thread neels
Attention is currently required from: fixeria, laforge, neels, pespin.

Hello Jenkins Builder, laforge, pespin,

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

https://gerrit.osmocom.org/c/osmo-sip-connector/+/35308?usp=email

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


Change subject: verbosely log MNCC and SDP
..

verbosely log MNCC and SDP

Change-Id: Ie923117929c6b79b1eb61e5a9f02a169edabc599
---
M src/mncc.c
M src/sdp.c
M src/sip.c
3 files changed, 68 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-sip-connector 
refs/changes/08/35308/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/35308?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-Change-Id: Ie923117929c6b79b1eb61e5a9f02a169edabc599
Gerrit-Change-Number: 35308
Gerrit-PatchSet: 4
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-CC: fixeria 
Gerrit-Attention: neels 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-MessageType: newpatchset


[M] Change in osmo-sip-connector[master]: verbosely log MNCC and SDP

2024-01-24 Thread Jenkins Builder
Attention is currently required from: fixeria, laforge, neels, pespin.

Jenkins Builder has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sip-connector/+/35308?usp=email )

Change subject: verbosely log MNCC and SDP
..


Patch Set 3:

(1 comment)

File src/mncc.c:

Robot Comment from checkpatch (run ID jenkins-gerrit-lint-13835):
https://gerrit.osmocom.org/c/osmo-sip-connector/+/35308/comment/b4ef1540_cb206d88
PS3, Line 1103: log_mncc("rx ", (void*)buf, rc);
"(foo*)" should be "(foo *)"



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

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-Change-Id: Ie923117929c6b79b1eb61e5a9f02a169edabc599
Gerrit-Change-Number: 35308
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-CC: fixeria 
Gerrit-Attention: neels 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Thu, 25 Jan 2024 01:52:07 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[M] Change in osmo-sip-connector[master]: verbosely log MNCC and SDP

2024-01-24 Thread neels
Attention is currently required from: fixeria, laforge, neels, pespin.

Hello Jenkins Builder, laforge, pespin,

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

https://gerrit.osmocom.org/c/osmo-sip-connector/+/35308?usp=email

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

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


Change subject: verbosely log MNCC and SDP
..

verbosely log MNCC and SDP

Change-Id: Ie923117929c6b79b1eb61e5a9f02a169edabc599
---
M src/mncc.c
M src/sdp.c
M src/sip.c
3 files changed, 70 insertions(+), 8 deletions(-)


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

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-Change-Id: Ie923117929c6b79b1eb61e5a9f02a169edabc599
Gerrit-Change-Number: 35308
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-CC: fixeria 
Gerrit-Attention: neels 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-MessageType: newpatchset


[S] Change in osmo-msc[master]: SDP/MGCP: pass octet-align=1 for AMR / pass all fmtp

2024-01-24 Thread neels
Attention is currently required from: fixeria, osmith, pespin.

neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/35307?usp=email )

Change subject: SDP/MGCP: pass octet-align=1 for AMR / pass all fmtp
..


Patch Set 3:

(2 comments)

Commit Message:

https://gerrit.osmocom.org/c/osmo-msc/+/35307/comment/ca1a5fe7_ae5f24b8
PS2, Line 30: Depends: osmo-mgw If58590bda8627519ff07e0b6f43aa47a274f052b
> update TODO-RELEASE?
thx!


File configure.ac:

https://gerrit.osmocom.org/c/osmo-msc/+/35307/comment/0845b657_634afdc3
PS3, Line 48: PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 
1.13.0)
now this ...
it needs the next non-patch release from osmo-mgw.git.
There is no 1.13.0 tag yet in osmo-mgw, so master builds will fail with this.
But >1.12 is also not sufficient, because 1.12.1 and 1.12.2 will not work.
Also >1.12.2 will only work until we do another 1.12.3 patch release.

so should I omit this and leave it to release management?



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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ief9225c9bcf7525a9a0a07c282ffb8cc0d092186
Gerrit-Change-Number: 35307
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-CC: osmith 
Gerrit-Attention: osmith 
Gerrit-Attention: fixeria 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Thu, 25 Jan 2024 01:37:47 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith 
Gerrit-MessageType: comment


[S] Change in osmo-msc[master]: SDP/MGCP: pass octet-align=1 for AMR / pass all fmtp

2024-01-24 Thread neels
Attention is currently required from: fixeria, neels, pespin.

Hello Jenkins Builder, fixeria, pespin,

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

https://gerrit.osmocom.org/c/osmo-msc/+/35307?usp=email

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

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


Change subject: SDP/MGCP: pass octet-align=1 for AMR / pass all fmtp
..

SDP/MGCP: pass octet-align=1 for AMR / pass all fmtp

Since recent libosmo-mgcp-client update (see Depends), we can now pass
fmtp for each individual codec entry to be sent in the SDP. Use that new
feature to pass any fmtp from rtp_stream.c to the MGW via MGCP.

In effect, this adds the 'octet-align=1', defined in codec_mapping.c as
the default for AMR, which was missing from the SDP/MGCP that osmo-msc
sends out.

A 2G to 2G call worked out OK without it, because omitting the
'octet-align' setting from MGCP disables all octet-align payload checks
in osmo-mgw. Both 2G call legs use octet-align=1, and things work out.

Running a call from 3G to 2G before this patch would result in osmo-mgw
dropping the RTP with logging like:

  DRTP NOTICE (rtpbridge/1@bsc0 I:B38CF524) rx_rtp(44 bytes): Expected RTP AMR 
octet-aligned=1 but got octet-aligned=0. check the config of your call-agent! 
(mgcp_network.c:1527)

...because osmo-bsc's MGW was instructed to expect octet-align=1, while
osmo-msc's MGW emits octet-align=0. This happens because converting the
3G IuUP to 2G AMR heeds the RFC 6871 specified default of octet-align=0.

So, after this patch, we accurately send "octet-align=1", and make the
IuUP-to-AMR conversion emit octet-align=1 to match 2G.

Side note: 3GPP specifies AoIP to use bandwidth-efficient AMR only;
however, in all known Osmocom world, our 2G BTS emit octet-aligned AMR
instead -- so in practice it makes most sense to run osmo-msc with
octet-align=1 as the default. osmo-msc shall at some point feature a
.cfg option to switch to octet-align=0 to conform with 3GPP, but until
then, osmo-msc now configures all AMR to be octet-align=1.

Depends: osmo-mgw If58590bda8627519ff07e0b6f43aa47a274f052b
Change-Id: Ief9225c9bcf7525a9a0a07c282ffb8cc0d092186
---
M TODO-RELEASE
M configure.ac
M src/libmsc/rtp_stream.c
3 files changed, 44 insertions(+), 1 deletion(-)


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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ief9225c9bcf7525a9a0a07c282ffb8cc0d092186
Gerrit-Change-Number: 35307
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-CC: osmith 
Gerrit-Attention: neels 
Gerrit-Attention: fixeria 
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


[M] Change in osmo-mgw[master]: mgw, client: add fmtp string to ptmap: allow all possible fmtp

2024-01-24 Thread neels
Attention is currently required from: pespin.

neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/34900?usp=email )

Change subject: mgw, client: add fmtp string to ptmap: allow all possible fmtp
..


Patch Set 14:

(1 comment)

Patchset:

PS14:
For the record, this and following patches are stalled, waiting for the 'add 
fmtp.h' patch.

That in turn is stalled because it is making public API decisions, and I want 
those to settle first in further tests with AMR rates and fmtp, before we cast 
it in stone.



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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: If58590bda8627519ff07e0b6f43aa47a274f052b
Gerrit-Change-Number: 34900
Gerrit-PatchSet: 14
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-CC: dexter 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Thu, 25 Jan 2024 01:29:09 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[M] Change in osmo-hnbgw[master]: pfcp: implement sending Network Instance IEs

2024-01-24 Thread neels
Attention is currently required from: fixeria, laforge, pespin.

neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-hnbgw/+/35645?usp=email )

Change subject: pfcp: implement sending Network Instance IEs
..


Patch Set 3:

(1 comment)

File src/osmo-hnbgw/ps_rab_fsm.c:

https://gerrit.osmocom.org/c/osmo-hnbgw/+/35645/comment/f2ae9068_9fbdefe0
PS3, Line 244:  
set_netinst(ser->create_pdr[ser->create_pdr_count].pdi.network_inst, 
g_hnbgw->config.pfcp.netinst.core);
(re macro: I mean, look at this, do you want to have a third one of these miles 
long arguments here? it's better code to have only one network_inst arg, for 
readability and against copy paste mistakes.)



--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/35645?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: Ief53dbfacf1645c32a07847d590c4884d4c8ca56
Gerrit-Change-Number: 35645
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-CC: pespin 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Thu, 25 Jan 2024 01:25:04 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[M] Change in osmo-hnbgw[master]: pfcp: implement sending Network Instance IEs

2024-01-24 Thread neels
Attention is currently required from: fixeria, laforge, pespin.

neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-hnbgw/+/35645?usp=email )

Change subject: pfcp: implement sending Network Instance IEs
..


Patch Set 3: Code-Review+2

(1 comment)

Patchset:

PS3:
technically i have two +1s now, but still giving some time for the discussion



--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/35645?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: Ief53dbfacf1645c32a07847d590c4884d4c8ca56
Gerrit-Change-Number: 35645
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-CC: pespin 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Thu, 25 Jan 2024 01:21:08 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-hnbgw[master]: pfcp: implement sending Network Instance IEs

2024-01-24 Thread neels
Attention is currently required from: fixeria, laforge, pespin.

neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-hnbgw/+/35645?usp=email )

Change subject: pfcp: implement sending Network Instance IEs
..


Patch Set 3:

(2 comments)

File src/osmo-hnbgw/hnbgw_vty.c:

https://gerrit.osmocom.org/c/osmo-hnbgw/+/35645/comment/6743cb78_ff58a9df
PS3, Line 862:  LOGP(DLPFCP, LOGL_NOTICE, "cfg: pfcp netinst %s %s\n", 
access_or_core, *str);
> Ack
it is very useful if osmo-upf posts what network resources it is using in the 
log at startup.
for example, sometimes i don't remember the VTY port, or want to verify what 
interface is used; i always go read the startup logs. This is configuring 
network interfaces to be used for GTP, so I think it is profound enough to post 
this in the log.


File src/osmo-hnbgw/ps_rab_fsm.c:

https://gerrit.osmocom.org/c/osmo-hnbgw/+/35645/comment/14131e90_cb7c2919
PS3, Line 202: #define set_netinst(NETINST_MEMBER, STRING) do { \
> imho another example of something which need not be a define macro, and which 
> would definetly be bet […]
main reason for macro is that it works for both

struct osmo_pfcp_ie_pdi.network_inst
struct osmo_pfcp_ie_pdi.network_inst_present

and

struct osmo_pfcp_ie_forw_params.network_inst
struct osmo_pfcp_ie_forw_params.network_inst_present

The NETINST_MEMBER##_present concatenation is only possible by macro.

it's just private to a .c file, so I like to have a bit of syntactic sugar with 
my code dedup.



--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/35645?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: Ief53dbfacf1645c32a07847d590c4884d4c8ca56
Gerrit-Change-Number: 35645
Gerrit-PatchSet: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-CC: pespin 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Thu, 25 Jan 2024 01:19:59 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


[M] Change in osmo-hnbgw[master]: add tests/pfcp_cfg.vty.with_pfcp

2024-01-24 Thread neels
neels has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-hnbgw/+/35643?usp=email )

Change subject: add tests/pfcp_cfg.vty.with_pfcp
..

add tests/pfcp_cfg.vty.with_pfcp

So far, we had no pfcp.vty test, because PFCP support is built
conditionally, and the pfcp.vty test would always fail without PFCP
support.

Add a pfcp test for the VTY, conditionally: use suffix .vty.with_pfcp to
identify tests that need PFCP support, and run those only when
configured with --enable-pfcp.

Related: SYS#5895
Change-Id: Ibb1797bb43a18f26fc693e0c8920cfd1f5fb9ede
---
M tests/Makefile.am
A tests/pfcp_cfg.vty.with_pfcp
2 files changed, 78 insertions(+), 0 deletions(-)

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




diff --git a/tests/Makefile.am b/tests/Makefile.am
index d499c33..df9e5a9 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -26,6 +26,7 @@
$(TESTSUITE) \
osmo-hnbgw-vty-test.cfg \
$(srcdir)/*.vty \
+   $(srcdir)/*.vty.with_pfcp \
$(srcdir)/*.ctrl \
$(srcdir)/config/*.cfg \
$(srcdir)/config/*.vty \
@@ -50,7 +51,11 @@
 endif

 # Run a specific test with: 'make vty-test VTY_TEST=osmo-hnbgw.vty'
+if ENABLE_PFCP
+VTY_TEST ?= *.vty*
+else
 VTY_TEST ?= *.vty
+endif

 # To update the VTY script from current application behavior,
 # pass -u to vty_script_runner.py by doing:
diff --git a/tests/pfcp_cfg.vty.with_pfcp b/tests/pfcp_cfg.vty.with_pfcp
new file mode 100644
index 000..a093ffb
--- /dev/null
+++ b/tests/pfcp_cfg.vty.with_pfcp
@@ -0,0 +1,55 @@
+OsmoHNBGW> enable
+OsmoHNBGW# configure terminal
+
+OsmoHNBGW(config)# hnbgw
+OsmoHNBGW(config-hnbgw)# list
+...
+  pfcp
+...
+OsmoHNBGW(config-hnbgw)# pfcp?
+  pfcp  Configure PFCP for GTP tunnel mapping
+
+OsmoHNBGW(config-hnbgw)# pfcp
+OsmoHNBGW(config-hnbgw-pfcp)# list
+...
+  local-addr IP_ADDR
+  local-port <1-65535>
+  remote-addr IP_ADDR
+
+OsmoHNBGW(config-hnbgw-pfcp)# local-addr?
+  local-addr  Local address for PFCP
+OsmoHNBGW(config-hnbgw-pfcp)# local-addr ?
+  IP_ADDR  IP address
+
+OsmoHNBGW(config-hnbgw-pfcp)# local-port?
+  local-port  Local port for PFCP
+OsmoHNBGW(config-hnbgw-pfcp)# local-port ?
+  <1-65535>  UDP port
+
+OsmoHNBGW(config-hnbgw-pfcp)# remote-addr?
+  remote-addr  Remote UPF's listen IP address; where to send PFCP requests
+OsmoHNBGW(config-hnbgw-pfcp)# remote-addr ?
+  IP_ADDR  IP address
+
+
+OsmoHNBGW(config-hnbgw-pfcp)# show running-config
+...
+hnbgw
+...
+ pfcp
+msc 0
+...
+
+OsmoHNBGW(config-hnbgw-pfcp)# remote-addr 127.0.0.2
+OsmoHNBGW(config-hnbgw-pfcp)# local-addr 127.0.0.1
+OsmoHNBGW(config-hnbgw-pfcp)# local-port 8805
+
+OsmoHNBGW(config-hnbgw-pfcp)# show running-config
+...
+hnbgw
+...
+ pfcp
+  local-addr 127.0.0.1
+  remote-addr 127.0.0.2
+msc 0
+...

--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/35643?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: Ibb1797bb43a18f26fc693e0c8920cfd1f5fb9ede
Gerrit-Change-Number: 35643
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-MessageType: merged


[S] Change in osmo-hnbgw[master]: tweak vty doc: "UDP port"

2024-01-24 Thread neels
neels has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-hnbgw/+/35642?usp=email )

Change subject: tweak vty doc: "UDP port"
..

tweak vty doc: "UDP port"

Change-Id: I24e52143a8f3d0c9f92985f6bb0420b34926eb33
---
M src/osmo-hnbgw/hnbgw_vty.c
1 file changed, 10 insertions(+), 1 deletion(-)

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




diff --git a/src/osmo-hnbgw/hnbgw_vty.c b/src/osmo-hnbgw/hnbgw_vty.c
index 62fe4aa..674832b 100644
--- a/src/osmo-hnbgw/hnbgw_vty.c
+++ b/src/osmo-hnbgw/hnbgw_vty.c
@@ -836,7 +836,7 @@
 DEFUN(cfg_pfcp_local_port, cfg_pfcp_local_port_cmd,
   "local-port <1-65535>",
   "Local port for PFCP\n"
-  "IP port\n")
+  "UDP port\n")
 {
g_hnbgw->config.pfcp.local_port = atoi(argv[0]);
return CMD_SUCCESS;

--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/35642?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: I24e52143a8f3d0c9f92985f6bb0420b34926eb33
Gerrit-Change-Number: 35642
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-MessageType: merged


[S] Change in osmo-hnbgw[master]: pfcp: fix missing vty_write of pfcp local-port

2024-01-24 Thread neels
neels has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-hnbgw/+/35644?usp=email )

Change subject: pfcp: fix missing vty_write of pfcp local-port
..

pfcp: fix missing vty_write of pfcp local-port

Change-Id: I180e67b8abdd3c0d91b30f1e7668b02f1a323809
---
M src/osmo-hnbgw/hnbgw_vty.c
M tests/pfcp_cfg.vty.with_pfcp
2 files changed, 12 insertions(+), 0 deletions(-)

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




diff --git a/src/osmo-hnbgw/hnbgw_vty.c b/src/osmo-hnbgw/hnbgw_vty.c
index 674832b..d401279 100644
--- a/src/osmo-hnbgw/hnbgw_vty.c
+++ b/src/osmo-hnbgw/hnbgw_vty.c
@@ -945,6 +945,8 @@
vty_out(vty, " pfcp%s", VTY_NEWLINE);
if (g_hnbgw->config.pfcp.local_addr)
vty_out(vty, "  local-addr %s%s", 
g_hnbgw->config.pfcp.local_addr, VTY_NEWLINE);
+   if (g_hnbgw->config.pfcp.local_port)
+   vty_out(vty, "  local-port %u%s", 
g_hnbgw->config.pfcp.local_port, VTY_NEWLINE);
if (g_hnbgw->config.pfcp.remote_addr)
vty_out(vty, "  remote-addr %s%s", 
g_hnbgw->config.pfcp.remote_addr, VTY_NEWLINE);

diff --git a/tests/pfcp_cfg.vty.with_pfcp b/tests/pfcp_cfg.vty.with_pfcp
index a093ffb..44b922c 100644
--- a/tests/pfcp_cfg.vty.with_pfcp
+++ b/tests/pfcp_cfg.vty.with_pfcp
@@ -50,6 +50,7 @@
 ...
  pfcp
   local-addr 127.0.0.1
+  local-port 8805
   remote-addr 127.0.0.2
 msc 0
 ...

--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/35644?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: I180e67b8abdd3c0d91b30f1e7668b02f1a323809
Gerrit-Change-Number: 35644
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-MessageType: merged


[S] Change in osmo-hnbgw[master]: pfcp: fix modification of wrong FAR ID

2024-01-24 Thread neels
neels has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-hnbgw/+/35641?usp=email )

Change subject: pfcp: fix modification of wrong FAR ID
..

pfcp: fix modification of wrong FAR ID

Do not update the Core-facing Forwarding Action Rule with the Access
side's remote TEID, update the Access-facing FAR as we should.

This is a seemingly small but very grave bug in osmo-hnbgw's PFCP
implementation, and proof that no-one anywhere has tested osmo-hnbgw's
PFCP support properly yet.

Related: SYS#5895
Change-Id: I596f1785d280d7e53e0cef649d6bb5df01ebf648
---
M src/osmo-hnbgw/ps_rab_fsm.c
1 file changed, 20 insertions(+), 2 deletions(-)

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




diff --git a/src/osmo-hnbgw/ps_rab_fsm.c b/src/osmo-hnbgw/ps_rab_fsm.c
index df98826..512c983 100644
--- a/src/osmo-hnbgw/ps_rab_fsm.c
+++ b/src/osmo-hnbgw/ps_rab_fsm.c
@@ -519,7 +519,8 @@
 static void ps_rab_fsm_wait_pfcp_mod_resp_onenter(struct osmo_fsm_inst *fi, 
uint32_t prev_state)
 {
/* We have been given the Access side's remote F-TEID, now in 
rab->access.remote, and we need to tell the UPF
-* about it. */
+* about it. This affects the Core to Access direction: now we know 
where to forward payloads coming from Core.
+*/
struct ps_rab *rab = fi->priv;
struct osmo_pfcp_msg *m;

@@ -531,7 +532,7 @@

m = ps_rab_new_pfcp_msg_req(rab, OSMO_PFCP_MSGT_SESSION_MOD_REQ);

-   if (rab_to_pfcp_session_mod_req_upd_far(>ies.session_mod_req, 
ID_ACCESS_TO_CORE, >access.remote)) {
+   if (rab_to_pfcp_session_mod_req_upd_far(>ies.session_mod_req, 
ID_CORE_TO_ACCESS, >access.remote)) {
LOG_PS_RAB(rab, LOGL_ERROR, "error composing Update FAR IE in 
PFCP msg\n");
ps_rab_failure(rab);
return;

--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/35641?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: I596f1785d280d7e53e0cef649d6bb5df01ebf648
Gerrit-Change-Number: 35641
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-MessageType: merged


[M] Change in osmo-upf[master]: manual: explain GTP Echo workaround for tunmap

2024-01-24 Thread neels
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-upf/+/35667?usp=email )

Change subject: manual: explain GTP Echo workaround for tunmap
..


Patch Set 1:

(1 comment)

File doc/manuals/chapters/running.adoc:

https://gerrit.osmocom.org/c/osmo-upf/+/35667/comment/86d4bc94_429a9657
PS1, Line 105: serving as GTP tunnel endpoint.
do you mean this section?



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

Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: Ic824fc876d1fad181254cb6894e51464c443b53c
Gerrit-Change-Number: 35667
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Thu, 25 Jan 2024 01:07:01 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[M] Change in libosmocore[master]: [WIP] gsm: gsm48_{en,de}code_bearer_cap: support octet 6d fields

2024-01-24 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/35681?usp=email )


Change subject: [WIP] gsm: gsm48_{en,de}code_bearer_cap: support octet 6d fields
..

[WIP] gsm: gsm48_{en,de}code_bearer_cap: support octet 6d fields

Unfortunately, adding new fields to struct gsm_mncc_bearer_cap is
not an option.  This struct is part of the MNCC PDU, and doing so
would result in breaking backwards compatibility :(

Change-Id: I53ef5aee38e3a2f34d22f2745fdffdaf334ce0b6
Related: OS#4396
---
M include/osmocom/gsm/mncc.h
M src/gsm/gsm48_ie.c
M tests/gsm0408/gsm0408_test.c
M tests/gsm0408/gsm0408_test.err
M tests/gsm0408/gsm0408_test.ok
5 files changed, 64 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/81/35681/1

diff --git a/include/osmocom/gsm/mncc.h b/include/osmocom/gsm/mncc.h
index db70235..4d96ee6 100644
--- a/include/osmocom/gsm/mncc.h
+++ b/include/osmocom/gsm/mncc.h
@@ -27,6 +27,8 @@
enum gsm48_bcap_interm_rate interm_rate;
enum gsm48_bcap_transp  transp;
enum gsm48_bcap_modem_type  modem_type;
+   enum gsm48_bcap_other_modem_typeother_modem_type;
+   enum gsm48_bcap_fixed_net_user_rate fixed_net_user_rate;
} data;
 };

diff --git a/src/gsm/gsm48_ie.c b/src/gsm/gsm48_ie.c
index b95609f..2ab2452 100644
--- a/src/gsm/gsm48_ie.c
+++ b/src/gsm/gsm48_ie.c
@@ -289,6 +289,15 @@
return 0;
bcap->data.transp = (lv[i] >> 5) & 3;
bcap->data.modem_type = lv[i] & 0x1F;
+
+   /* octet 6d */
+   if (!(lv[i] & 0x80)) {
+   i++;
+   if (in_len < i)
+   return 0;
+   bcap->data.other_modem_type = 
(lv[i] >> 5) & 0x03;
+   bcap->data.fixed_net_user_rate 
= lv[i] & 0x1f;
+   }
}
}

@@ -357,6 +366,14 @@
lv[i] = 0x80 |
((bcap->data.transp & 3) << 5) |
(bcap->data.modem_type & 0x1f);
+   /* octet 6d */
+   if (bcap->data.other_modem_type != GSM48_BCAP_OTHER_MT_NONE ||
+   bcap->data.fixed_net_user_rate != GSM48_BCAP_FNUR_NONE) {
+   lv[i++] &= ~0x80; /* octet 6c becomes extended */
+   lv[i] = 0x80 /* octet 6d is not extended */
+ | (bcap->data.other_modem_type & 0x03) << 5
+ | (bcap->data.fixed_net_user_rate & 0x1f);
+   }
break;
default:
return -EINVAL;
diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c
index 8a89357..2124227 100644
--- a/tests/gsm0408/gsm0408_test.c
+++ b/tests/gsm0408/gsm0408_test.c
@@ -75,6 +75,30 @@
},
 };

+static const uint8_t csd_9600_v34_lv[] = { 0x08, 0xa2, 0xb8, 0x81, 0x21, 0x15, 
0x63, 0x06, 0xc0 };
+
+static const struct gsm_mncc_bearer_cap bcap_csd_9600_v34 = {
+   .transfer   = GSM48_BCAP_ITCAP_3k1_AUDIO,
+   .mode   = GSM48_BCAP_TMOD_CIRCUIT,
+   .coding = GSM48_BCAP_CODING_GSM_STD,
+   .radio  = GSM48_BCAP_RRQ_FR_ONLY,
+   .speech_ver[0]  = -1,
+   .data = {
+   .rate_adaption  = GSM48_BCAP_RA_NONE,
+   .sig_access = GSM48_BCAP_SA_I440_I450,
+   .async  = 1,
+   .nr_stop_bits   = 1,
+   .nr_data_bits   = 8,
+   .user_rate  = GSM48_BCAP_UR_9600,
+   .parity = GSM48_BCAP_PAR_NONE,
+   .interm_rate= GSM48_BCAP_IR_16k,
+   .transp = GSM48_BCAP_TR_TRANSP,
+   .modem_type = GSM48_BCAP_MT_V32,
+   .other_modem_type = GSM48_BCAP_OTHER_MT_V34,
+   .fixed_net_user_rate = GSM48_BCAP_FNUR_NONE,
+   },
+};
+
 static const uint8_t csd_2400_v22bis_lv[] = { 0x07, 0xa2, 0xb8, 0x81, 0x21, 
0x13, 0x43, 0x83 };

 static const struct gsm_mncc_bearer_cap bcap_csd_2400_v22bis = {
@@ -133,6 +157,9 @@
{ csd_4800_rlp_lv, _csd_4800_rlp, "CSD 4800/RLP/non-transparent" },
{ /* XXX: this testcase is expected to fail because octet 4 is not 
represented in
   * 'struct gsm_mncc_bearer_cap' and the encoder unconditionally 
hard-codes it to 0x88. */
+ csd_9600_v34_lv, _csd_9600_v34, "CSD 9600/V.34/transparent" },
+   { /* XXX: this testcase is expected to fail because octet 4 is not 
represented in
+  * 

[S] Change in libosmocore[master]: gsm: add more definitions from Table 10.5.112/3GPP TS 24.008

2024-01-24 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/35680?usp=email )


Change subject: gsm: add more definitions from Table 10.5.112/3GPP TS 24.008
..

gsm: add more definitions from Table 10.5.112/3GPP TS 24.008

Change-Id: I25e40853ace09fa98b614f3893eeba600be8fcdc
Related: OS#4396
---
M include/osmocom/gsm/protocol/gsm_04_08.h
1 file changed, 32 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/80/35680/1

diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h 
b/include/osmocom/gsm/protocol/gsm_04_08.h
index 84b2b2a..5d1da74 100644
--- a/include/osmocom/gsm/protocol/gsm_04_08.h
+++ b/include/osmocom/gsm/protocol/gsm_04_08.h
@@ -2210,6 +2210,28 @@
GSM48_BCAP_MT_AUTO_1= 8,
 };

+/*! Table 10.5.112/3GPP TS 24.008: Other modem type (octet 6d) */
+enum gsm48_bcap_other_modem_type {
+   GSM48_BCAP_OTHER_MT_NONE= 0,/*!< No other modem type 
specified */
+   GSM48_BCAP_OTHER_MT_V34 = 2,/*!< According to ITU-T Rec. 
V.34 */
+};
+
+/*! Table 10.5.112/3GPP TS 24.008: Fixed network user rate (octet 6d) */
+enum gsm48_bcap_fixed_net_user_rate {
+   GSM48_BCAP_FNUR_NONE= 0,/*!< FNUR not applicable / No 
meaning associated */
+   GSM48_BCAP_FNUR_X1_V110_9600= 1,/*!< 9.6 kbit/s (according to 
ITU-T Rec. X.1 and V.110) */
+   GSM48_BCAP_FNUR_X1_V110_14400   = 2,/*!< 14.4 kbit/s (according to 
ITU-T Rec. X.1 and V.110) */
+   GSM48_BCAP_FNUR_X1_V110_19200   = 3,/*!< 19.2 kbit/s (according to 
ITU-T Rec. X.1 and V.110) */
+   GSM48_BCAP_FNUR_X1_V110_28800   = 4,/*!< 28.8 kbit/s (according to 
ITU-T Rec. X.1 and V.110) */
+   GSM48_BCAP_FNUR_X1_V110_38400   = 5,/*!< 38.4 kbit/s (according to 
ITU-T Rec. X.1 and V.110) */
+   GSM48_BCAP_FNUR_X1_V110_48000   = 6,/*!< 48.0 kbit/s (according to 
ITU-T Rec. X.1 and V.110) */
+   GSM48_BCAP_FNUR_X1_V110_56000   = 7,/*!< 56.0 kbit/s (according to 
ITU-T Rec. X.1 and V.110) */
+   GSM48_BCAP_FNUR_BT_64000= 8,/*!< 64.0 kbit/s bit 
transparent */
+   GSM48_BCAP_FNUR_BT_33600= 9,/*!< 33.6 kbit/s bit 
transparent */
+   GSM48_BCAP_FNUR_I460_32000  = 10,   /*!< 32.0 kbit/s (according to 
ITU-T Rec. I.460) */
+   GSM48_BCAP_FNUR_V34_31200   = 11,   /*!< 31.2 kbit/s (according to 
ITU-T Rec. V.34) */
+};
+
 /*! GSM 04.08 Bearer Capability: Speech Version Indication
  *  (See also 3GPP TS 24.008, Table 10.5.103) */
 enum gsm48_bcap_speech_ver {

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35680?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: I25e40853ace09fa98b614f3893eeba600be8fcdc
Gerrit-Change-Number: 35680
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


[S] Change in libosmocore[master]: tests/a5: fix bit-wise vs logical and in test_a5[34]()

2024-01-24 Thread fixeria
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/libosmocore/+/35679?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: tests/a5: fix bit-wise vs logical and in test_a5[34]()
..

tests/a5: fix bit-wise vs logical and in test_a5[34]()

This fixes a -Wbitwise-instead-of-logical warning thrown by clang.

Change-Id: I6ae0d13882ab7a6b1ca35ccd7f9a5e1d9cac911d
---
M tests/a5/a5_test.c
1 file changed, 13 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/79/35679/2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35679?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: I6ae0d13882ab7a6b1ca35ccd7f9a5e1d9cac911d
Gerrit-Change-Number: 35679
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset


[S] Change in libosmocore[master]: tests/iuup: fix duplicate assignment in def_configure_req

2024-01-24 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/35677?usp=email )


Change subject: tests/iuup: fix duplicate assignment in def_configure_req
..

tests/iuup: fix duplicate assignment in def_configure_req

This fixes a -Winitializer-overrides warning thrown by clang.

Change-Id: Id29237d212a05dec1c57bbfd53d9cb7e71ca0991
---
M tests/iuup/iuup_test.c
1 file changed, 11 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/77/35677/1

diff --git a/tests/iuup/iuup_test.c b/tests/iuup/iuup_test.c
index f3aba66..7798aa2 100644
--- a/tests/iuup/iuup_test.c
+++ b/tests/iuup/iuup_test.c
@@ -26,7 +26,6 @@
{.used = 1, .id = 2, .IPTI = 1, .subflow_sizes = {0, 0, 0} },
},
/* .delivery_err_sdu = All set to 0 (YES) by default, */
-   .IPTIs_present = true,
.t_init = { .t_ms = IUUP_TIMER_INIT_T_DEFAULT, .n_max = 
IUUP_TIMER_INIT_N_DEFAULT },
.t_ta = { .t_ms = IUUP_TIMER_TA_T_DEFAULT, .n_max = 
IUUP_TIMER_TA_N_DEFAULT },
.t_rc = { .t_ms = IUUP_TIMER_RC_T_DEFAULT, .n_max = 
IUUP_TIMER_RC_N_DEFAULT },

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35677?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: Id29237d212a05dec1c57bbfd53d9cb7e71ca0991
Gerrit-Change-Number: 35677
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


[S] Change in libosmocore[master]: tests/a5: fix bit-wise vs logical and in test_a53()

2024-01-24 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/35679?usp=email )


Change subject: tests/a5: fix bit-wise vs logical and in test_a53()
..

tests/a5: fix bit-wise vs logical and in test_a53()

This fixes a -Wbitwise-instead-of-logical warning thrown by clang.

Change-Id: I6ae0d13882ab7a6b1ca35ccd7f9a5e1d9cac911d
---
M tests/a5/a5_test.c
1 file changed, 12 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/79/35679/1

diff --git a/tests/a5/a5_test.c b/tests/a5/a5_test.c
index 69f1035..c6a7540 100644
--- a/tests/a5/a5_test.c
+++ b/tests/a5/a5_test.c
@@ -66,7 +66,7 @@
_a5_3(key, count, dlout, NULL, false);
_a5_3(key, count, NULL, ulout, false);

-   return print_a5(3, 8, "DL", dlout, block1) & print_a5(3, 8, "UL", 
ulout, block2);
+   return print_a5(3, 8, "DL", dlout, block1) && print_a5(3, 8, "UL", 
ulout, block2);
 }

 static inline bool test_a54(const char * kc, uint32_t count, const char * 
block1, const char * block2)

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35679?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: I6ae0d13882ab7a6b1ca35ccd7f9a5e1d9cac911d
Gerrit-Change-Number: 35679
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


[S] Change in libosmocore[master]: tests/sockaddr_str: comment out unused code (make clang happy)

2024-01-24 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/35678?usp=email )


Change subject: tests/sockaddr_str: comment out unused code (make clang happy)
..

tests/sockaddr_str: comment out unused code (make clang happy)

This fixes a -Wunused-function warning thrown by clang.

Change-Id: I45e9044f80e1f634c811e729f4314ec9bcf6a9ad
---
M tests/sockaddr_str/sockaddr_str_test.c
1 file changed, 13 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/78/35678/1

diff --git a/tests/sockaddr_str/sockaddr_str_test.c 
b/tests/sockaddr_str/sockaddr_str_test.c
index 541c3a1..434a536 100644
--- a/tests/sockaddr_str/sockaddr_str_test.c
+++ b/tests/sockaddr_str/sockaddr_str_test.c
@@ -68,6 +68,7 @@
}
 }

+#if 0
 static const struct value_string err_names[] = {
{ -EINVAL, "-EINVAL" },
{}
@@ -75,6 +76,7 @@

 static inline const char *err_name(int err)
 { return get_value_string(err_names, err); }
+#endif

 static inline const char *rc_name(int rc)
 {

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35678?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: I45e9044f80e1f634c811e729f4314ec9bcf6a9ad
Gerrit-Change-Number: 35678
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


[M] Change in libosmo-abis[master]: Add support for sending and receiving Sa bits, as well as some line s...

2024-01-24 Thread jolly
Attention is currently required from: dexter, laforge, tnt.

jolly has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-abis/+/35563?usp=email )

Change subject: Add support for sending and receiving Sa bits, as well as some 
line signals
..


Patch Set 4:

(1 comment)

File src/e1_input.c:

https://gerrit.osmocom.org/c/libosmo-abis/+/35563/comment/62c9c87f_04307ab0
PS4, Line 1124: { S_L_INP_LINE_LOF, "LINE-LOF" },
  : { S_L_INP_LINE_NOLOF,   "LINE-NOLOF" },
> but please send patches for user applications that treat this new LOF similar 
> to how they treat LOS. […]
osmo-v5 already supports LOF (latest patch). is there any other application 
that processes line signals like it?



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

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Ie7643693c2daac99f5747591decd60e982b8052a
Gerrit-Change-Number: 35563
Gerrit-PatchSet: 4
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-CC: dexter 
Gerrit-Attention: laforge 
Gerrit-Attention: tnt 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Wed, 24 Jan 2024 20:38:46 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: jolly 
Comment-In-Reply-To: laforge 
Comment-In-Reply-To: tnt 
Gerrit-MessageType: comment


[L] Change in ...osmo-epdg[master]: Implement UE-initiated Detach

2024-01-24 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35676?usp=email )


Change subject: Implement UE-initiated Detach
..

Implement UE-initiated Detach

This commit is a first step towards implementing the full procedure. It
implements handling at the GSUP CEAI interface and operating on the
attached PGW to delete the session. No work towards the HSS from AAA
server now from PGW to the AAA is done yet.

Change-Id: I2e922f76c2fa601c5f61fa23d6df5fb62c3e133d
---
M .gitignore
A include/gtp_utils.hrl
A src/conv.erl
M src/epdg_gtpc_s2b.erl
M src/gsup_server.erl
M src/gtp_utils.erl
M src/ue_fsm.erl
7 files changed, 423 insertions(+), 10 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-epdg 
refs/changes/76/35676/1

diff --git a/.gitignore b/.gitignore
index 08ae348..253618b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
 _build/
-include/
+include/diameter_*
 log/

 *.beam
diff --git a/include/gtp_utils.hrl b/include/gtp_utils.hrl
new file mode 100644
index 000..453efb0
--- /dev/null
+++ b/include/gtp_utils.hrl
@@ -0,0 +1,113 @@
+% (C) 2023 by sysmocom
+%
+% All Rights Reserved
+%
+% This program is free software; you can redistribute it and/or modify
+% it under the terms of the GNU Affero General Public License as
+% published by the Free Software Foundation; either version 3 of the
+% License, or (at your option) any later version.
+%
+% This program is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+% GNU General Public License for more details.
+%
+% You should have received a copy of the GNU Affero General Public License
+% along with this program.  If not, see .
+%
+% Additional Permission under GNU AGPL version 3 section 7:
+%
+% If you modify this Program, or any covered work, by linking or
+% combining it with runtime libraries of Erlang/OTP as released by
+% Ericsson on http://www.erlang.org (or a modified version of these
+% libraries), containing parts covered by the terms of the Erlang Public
+% License (http://www.erlang.org/EPLICENSE), the licensors of this
+% Program grant you additional permission to convey the resulting work
+% without the need to license the runtime libraries of Erlang/OTP under
+% the GNU Affero General Public License. Corresponding Source for a
+% non-source form of such a combination shall include the source code
+% for the parts of the runtime libraries of Erlang/OTP used as well as
+% that of the covered work.
+%
+-hrl_name('gtp_utils.hrl').
+
+-define(GTP2_CAUSE_RESERVED, 1).
+-define(GTP2_CAUSE_LOCAL_DETACH, 2).
+-define(GTP2_CAUSE_COMPLETE_DETACH, 3).
+-define(GTP2_CAUSE_RAT_CHANGED_FROM_3GPP_TO_NON_3GPP, 4).
+-define(GTP2_CAUSE_ISR_DEACTIVATION, 5).
+-define(GTP2_CAUSE_ERROR_INDICATION_RECEIVED_FROM_RNC_ENODEB_S4_SGSN, 6).
+-define(GTP2_CAUSE_IMSI_DETACH_ONLY, 7).
+-define(GTP2_CAUSE_REACTIVATION_REQUESTED, 8).
+-define(GTP2_CAUSE_PDN_RECONNECTION_TO_THIS_APN_DISALLOWED, 9).
+-define(GTP2_CAUSE_ACCESS_CHANGED_FROM_NON_3GPP_TO_3GPP, 10).
+-define(GTP2_CAUSE_PDN_CONNECTION_INACTIVITY_TIMER_EXPIRES, 11).
+-define(GTP2_CAUSE_PGW_NOT_RESPONDING, 12).
+-define(GTP2_CAUSE_NETWORK_FAILURE, 13).
+-define(GTP2_CAUSE_QOS_PARAMETER_MISMATCH, 14).
+-define(GTP2_CAUSE_REQUEST_ACCEPTED, 16).
+-define(GTP2_CAUSE_REQUEST_ACCEPTED_PARTIALLY, 17).
+-define(GTP2_CAUSE_NEW_PDN_TYPE_DUE_TO_NETWORK_PREFERENCE, 18).
+-define(GTP2_CAUSE_NEW_PDN_TYPE_DUE_TO_SINGLE_ADDRESS_BEARER_ONLY, 19).
+-define(GTP2_CAUSE_CONTEXT_NOT_FOUND, 64).
+-define(GTP2_CAUSE_INVALID_MESSAGE_FORMAT, 65).
+-define(GTP2_CAUSE_VERSION_NOT_SUPPORTED_BY_NEXT_PEER, 66).
+-define(GTP2_CAUSE_INVALID_LENGTH, 67).
+-define(GTP2_CAUSE_SERVICE_NOT_SUPPORTED, 68).
+-define(GTP2_CAUSE_MANDATORY_IE_INCORRECT, 69).
+-define(GTP2_CAUSE_MANDATORY_IE_MISSING, 70).
+-define(GTP2_CAUSE_SYSTEM_FAILURE, 72).
+-define(GTP2_CAUSE_NO_RESOURCES_AVAILABLE, 73).
+-define(GTP2_CAUSE_SEMANTIC_ERROR_IN_THE_TFT_OPERATION, 74).
+-define(GTP2_CAUSE_SYNTACTIC_ERROR_IN_THE_TFT_OPERATION, 75).
+-define(GTP2_CAUSE_SEMANTIC_ERRORS_IN_PACKET_FILTER, 76).
+-define(GTP2_CAUSE_SYNTACTIC_ERRORS_IN_PACKET_FILTER, 77).
+-define(GTP2_CAUSE_MISSING_OR_UNKNOWN_APN, 78).
+-define(GTP2_CAUSE_GRE_KEY_NOT_FOUND, 80).
+-define(GTP2_CAUSE_RELOCATION_FAILURE, 81).
+-define(GTP2_CAUSE_DENIED_IN_RAT, 82).
+-define(GTP2_CAUSE_PREFERRED_PDN_TYPE_NOT_SUPPORTED, 83).
+-define(GTP2_CAUSE_ALL_DYNAMIC_ADDRESSES_ARE_OCCUPIED, 84).
+-define(GTP2_CAUSE_UE_CONTEXT_WITHOUT_TFT_ALREADY_ACTIVATED, 85).
+-define(GTP2_CAUSE_PROTOCOL_TYPE_NOT_SUPPORTED, 86).
+-define(GTP2_CAUSE_UE_NOT_RESPONDING, 87).
+-define(GTP2_CAUSE_UE_REFUSES, 88).
+-define(GTP2_CAUSE_SERVICE_DENIED, 89).
+-define(GTP2_CAUSE_UNABLE_TO_PAGE_UE, 90).
+-define(GTP2_CAUSE_NO_MEMORY_AVAILABLE, 91).

[S] Change in ...osmo-epdg[master]: gsup_server: Use new GSUP Cause defines from osmo_gsup

2024-01-24 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35673?usp=email )


Change subject: gsup_server: Use new GSUP Cause defines from osmo_gsup
..

gsup_server: Use new GSUP Cause defines from osmo_gsup

Change-Id: Ie19a0d0b81e0a264401ea37e0cfd74802aee68fe
---
M rebar.lock
M src/gsup_server.erl
2 files changed, 15 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-epdg 
refs/changes/73/35673/1

diff --git a/rebar.lock b/rebar.lock
index d74d179..a542cbc 100644
--- a/rebar.lock
+++ b/rebar.lock
@@ -12,7 +12,7 @@
   0},
  {<<"osmo_gsup">>,
   {git,"https://gerrit.osmocom.org/erlang/osmo_gsup;,
-   {ref,"1a064fa6aece492352271ae164b29262d66f6b6d"}},
+   {ref,"1391d074f610e736368319d56fd958fa36e3addf"}},
   0},
  {<<"osmo_ss7">>,
   {git,"https://gitea.osmocom.org/erlang/osmo_ss7;,
diff --git a/src/gsup_server.erl b/src/gsup_server.erl
index 5fe227c..a110b40 100644
--- a/src/gsup_server.erl
+++ b/src/gsup_server.erl
@@ -129,7 +129,7 @@
imsi => 
list_to_binary(Mar#'MAA'.'User-Name'),
auth_tuples => lists:map(fun 
dia_sip2gsup/1, SipAuthTuples)
};
-   {error, _} ->   Resp = #{message_type => send_auth_info_err, 
imsi => Imsi, message_class => 5, cause => 16#11}
+   {error, _} ->   Resp = #{message_type => send_auth_info_err, 
imsi => Imsi, message_class => 5, cause => ?GSUP_CAUSE_NET_FAIL}
end,
lager:info("GSUP: Tx ~p~n", [Resp]),
ipa_proto:send(Socket, ?IPAC_PROTO_EXT_GSUP, Resp),
@@ -146,7 +146,7 @@
{error, _} ->   Resp = #{message_type => location_upd_err,
 imsi => Imsi,
 message_class => 5,
-cause => 16#11 % FIXME: Use proper 
defines as cause code and use Network failure
+cause => ?GSUP_CAUSE_NET_FAIL
 }
end,
lager:info("GSUP: Tx ~p~n", [Resp]),
@@ -178,7 +178,7 @@
Resp = #{message_type => epdg_tunnel_error,
imsi => Imsi,
message_class => 5,
-   cause => 16#11 % FIXME: Use proper defines as 
cause code and use Network failure
+   cause => ?GSUP_CAUSE_NET_FAIL
}
end,
lager:info("GSUP: Tx ~p~n", [Resp]),
@@ -221,7 +221,7 @@
Resp = #{message_type => location_upd_err,
 imsi => Imsi,
 message_class => 5,
-cause => 16#11 % FIXME: Use proper defines as 
cause code and use Network failure
+cause => ?GSUP_CAUSE_IMSI_UNKNOWN
},
lager:info("GSUP: Tx ~p~n", [Resp]),
ipa_proto:send(Socket, ?IPAC_PROTO_EXT_GSUP, Resp)
@@ -240,7 +240,7 @@
Resp = #{message_type => epdg_tunnel_error,
 imsi => Imsi,
 message_class => 5,
-cause => 16#11 % FIXME: Use proper defines as 
cause code and use Network failure
+cause => ?GSUP_CAUSE_IMSI_UNKNOWN
},
lager:info("GSUP: Tx ~p~n", [Resp]),
ipa_proto:send(Socket, ?IPAC_PROTO_EXT_GSUP, Resp)

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

Gerrit-Project: erlang/osmo-epdg
Gerrit-Branch: master
Gerrit-Change-Id: Ie19a0d0b81e0a264401ea37e0cfd74802aee68fe
Gerrit-Change-Number: 35673
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


[S] Change in ...osmo-epdg[master]: gsup_server: Introduce tx_gsup() internal function

2024-01-24 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35674?usp=email )


Change subject: gsup_server: Introduce tx_gsup() internal function
..

gsup_server: Introduce tx_gsup() internal function

Change-Id: I95d37182da89e39993eb7d5aaf63446e5f99ae2a
---
M src/gsup_server.erl
1 file changed, 19 insertions(+), 10 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-epdg 
refs/changes/74/35674/1

diff --git a/src/gsup_server.erl b/src/gsup_server.erl
index a110b40..521d4c3 100644
--- a/src/gsup_server.erl
+++ b/src/gsup_server.erl
@@ -131,8 +131,7 @@
};
{error, _} ->   Resp = #{message_type => send_auth_info_err, 
imsi => Imsi, message_class => 5, cause => ?GSUP_CAUSE_NET_FAIL}
end,
-   lager:info("GSUP: Tx ~p~n", [Resp]),
-   ipa_proto:send(Socket, ?IPAC_PROTO_EXT_GSUP, Resp),
+   tx_gsup(Socket, Resp),
{noreply, State};

 handle_cast({lu_response, {Imsi, Result}}, State) ->
@@ -149,8 +148,7 @@
 cause => ?GSUP_CAUSE_NET_FAIL
 }
end,
-   lager:info("GSUP: Tx ~p~n", [Resp]),
-   ipa_proto:send(Socket, ?IPAC_PROTO_EXT_GSUP, Resp),
+   tx_gsup(Socket, Resp),
{noreply, State};

 handle_cast({tunnel_response, {Imsi, Result}}, State) ->
@@ -181,8 +179,7 @@
cause => ?GSUP_CAUSE_NET_FAIL
}
end,
-   lager:info("GSUP: Tx ~p~n", [Resp]),
-   ipa_proto:send(Socket, ?IPAC_PROTO_EXT_GSUP, Resp),
+   tx_gsup(Socket, Resp),
{noreply, State};

 handle_cast(Info, S) ->
@@ -223,8 +220,7 @@
 message_class => 5,
 cause => ?GSUP_CAUSE_IMSI_UNKNOWN
},
-   lager:info("GSUP: Tx ~p~n", [Resp]),
-   ipa_proto:send(Socket, ?IPAC_PROTO_EXT_GSUP, Resp)
+   tx_gsup(Socket, Resp)
end,
{noreply, State};

@@ -242,8 +238,7 @@
 message_class => 5,
 cause => ?GSUP_CAUSE_IMSI_UNKNOWN
},
-   lager:info("GSUP: Tx ~p~n", [Resp]),
-   ipa_proto:send(Socket, ?IPAC_PROTO_EXT_GSUP, Resp)
+   tx_gsup(Socket, Resp)
end,
{noreply, State};

@@ -273,6 +268,11 @@
 %% Internal Function Definitions
 %% --

+tx_gsup(Socket, Msg) ->
+   lager:info("GSUP: Tx ~p~n", [Msg]),
+   ipa_proto:send(Socket, ?IPAC_PROTO_EXT_GSUP, Msg).
+
+
 new_gsups_ue(Imsi, State) ->
{ok, Pid} = ue_fsm:start_link(Imsi),
UE = #gsups_ue{imsi = Imsi, pid = Pid},

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

Gerrit-Project: erlang/osmo-epdg
Gerrit-Branch: master
Gerrit-Change-Id: I95d37182da89e39993eb7d5aaf63446e5f99ae2a
Gerrit-Change-Number: 35674
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


[M] Change in ...osmo-epdg[master]: Use call() instead of cast() in ue_fsm

2024-01-24 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35675?usp=email )


Change subject: Use call() instead of cast() in ue_fsm
..

Use call() instead of cast() in ue_fsm

This allows accounting for problems in the FSM from the calling code,
and act accordingly, eg. rejecting a message.

Change-Id: I235d3c8fb3a863d288b5433c39e0da65f747936b
---
M src/gsup_server.erl
M src/ue_fsm.erl
2 files changed, 90 insertions(+), 27 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-epdg 
refs/changes/75/35675/1

diff --git a/src/gsup_server.erl b/src/gsup_server.erl
index 521d4c3..30e8864 100644
--- a/src/gsup_server.erl
+++ b/src/gsup_server.erl
@@ -202,9 +202,18 @@
{noreply, S#gsups_state{socket=Socket}};

 % send auth info / requesting authentication tuples
-handle_info({ipa, _Socket, ?IPAC_PROTO_EXT_GSUP, _GsupMsgRx = #{message_type 
:= send_auth_info_req, imsi := Imsi}}, State0) ->
+handle_info({ipa, Socket, ?IPAC_PROTO_EXT_GSUP, _GsupMsgRx = #{message_type := 
send_auth_info_req, imsi := Imsi}}, State0) ->
{UE, State1} = find_or_new_gsups_ue(Imsi, State0),
-   ue_fsm:auth_request(UE#gsups_ue.pid),
+   case ue_fsm:auth_request(UE#gsups_ue.pid) of
+   ok -> ok;
+   {error, _} ->
+   Resp = #{message_type => send_auth_info_err,
+imsi => Imsi,
+message_class => 5,
+cause => ?GSUP_CAUSE_NET_FAIL
+   },
+   tx_gsup(Socket, Resp)
+   end,
{noreply, State1};

 % location update request / when a UE wants to connect to a specific APN. This 
will trigger a AAA->HLR Request Server Assignment Request
@@ -212,15 +221,24 @@
 handle_info({ipa, Socket, ?IPAC_PROTO_EXT_GSUP, _GsupMsgRx = #{message_type := 
location_upd_req, imsi := Imsi}}, State) ->
UE = find_gsups_ue_by_imsi(Imsi, State),
case UE of
-   #gsups_ue{imsi = Imsi} ->
-   ue_fsm:lu_request(UE#gsups_ue.pid);
-   undefined ->
+   #gsups_ue{imsi = Imsi} ->
+   case ue_fsm:lu_request(UE#gsups_ue.pid) of
+   ok -> ok;
+   {error, _} ->
Resp = #{message_type => location_upd_err,
 imsi => Imsi,
 message_class => 5,
-cause => ?GSUP_CAUSE_IMSI_UNKNOWN
+cause => ?GSUP_CAUSE_NET_FAIL
},
tx_gsup(Socket, Resp)
+   end;
+   undefined ->
+   Resp = #{message_type => location_upd_err,
+imsi => Imsi,
+message_class => 5,
+cause => ?GSUP_CAUSE_IMSI_UNKNOWN
+   },
+   tx_gsup(Socket, Resp)
end,
{noreply, State};

@@ -230,15 +248,24 @@
lager:info("GSUP: Rx ~p~n", [GsupMsgRx]),
UE = find_gsups_ue_by_imsi(Imsi, State),
case UE of
-   #gsups_ue{imsi = Imsi} ->
-   ue_fsm:tunnel_request(UE#gsups_ue.pid);
-   undefined ->
+   #gsups_ue{imsi = Imsi} ->
+   case ue_fsm:tunnel_request(UE#gsups_ue.pid) of
+   ok -> ok;
+   {error, _} ->
Resp = #{message_type => epdg_tunnel_error,
-imsi => Imsi,
-message_class => 5,
-cause => ?GSUP_CAUSE_IMSI_UNKNOWN
+   imsi => Imsi,
+   message_class => 5,
+   cause => ?GSUP_CAUSE_NET_FAIL
},
tx_gsup(Socket, Resp)
+   end;
+   undefined ->
+   Resp = #{message_type => epdg_tunnel_error,
+   imsi => Imsi,
+   message_class => 5,
+   cause => ?GSUP_CAUSE_IMSI_UNKNOWN
+   },
+   tx_gsup(Socket, Resp)
end,
{noreply, State};

diff --git a/src/ue_fsm.erl b/src/ue_fsm.erl
index f6b2b7e..c0b8872 100644
--- a/src/ue_fsm.erl
+++ b/src/ue_fsm.erl
@@ -50,19 +50,39 @@

 auth_request(Pid) ->
 lager:info("ue_fsm auth_request~n", []),
-gen_statem:cast(Pid, auth_request).
+try
+gen_statem:call(Pid, auth_request)
+catch
+exit:Err ->
+{error, Err}
+end.

 lu_request(Pid) ->
 lager:info("ue_fsm lu_request~n", []),
-gen_statem:cast(Pid, lu_request).
+try
+gen_statem:call(Pid, lu_request)
+catch
+exit:Err ->
+{error, Err}
+end.

 tunnel_request(Pid) ->
 lager:info("ue_fsm tunnel_request~n", []),
-

[S] Change in libosmocore[master]: Prevent poll() in select.c to timeout too early

2024-01-24 Thread pespin
Attention is currently required from: fixeria, jolly.

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

Change subject: Prevent poll() in select.c to timeout too early
..


Patch Set 1: -Code-Review

(1 comment)

File src/core/timer.c:

https://gerrit.osmocom.org/c/libosmocore/+/35672/comment/af2fde1a_22828c3d
PS1, Line 199: nearest_ms += (nearest_p->tv_usec + 999) / 1000;
> Just curious: in which project did you find timers less than 1 ms? […]
Ack, maybe it makes sense to round 0->1 to avoid busy polls, and let the others 
X.Y ->X.0. Anyway the system will already add some extra time when processing, 
so let's not add more time ourselves here.



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35672?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: I79de77c79af4d50d1eb9ca0c5417123ff760dca3
Gerrit-Change-Number: 35672
Gerrit-PatchSet: 1
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-CC: fixeria 
Gerrit-Attention: jolly 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Wed, 24 Jan 2024 19:59:31 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


[S] Change in libosmocore[master]: Prevent poll() in select.c to timeout too early

2024-01-24 Thread fixeria
Attention is currently required from: jolly.

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

Change subject: Prevent poll() in select.c to timeout too early
..


Patch Set 1:

(2 comments)

Commit Message:

https://gerrit.osmocom.org/c/libosmocore/+/35672/comment/3521b26d_5e5f8689
PS1, Line 11: Note that poll() has a granularity of 1 millisecond.
... while `select()` has a granularity of microseconds, according to the man 
page.


File src/core/timer.c:

https://gerrit.osmocom.org/c/libosmocore/+/35672/comment/c4d06513_d5da1e09
PS1, Line 199: nearest_ms += (nearest_p->tv_usec + 999) / 1000;
Just curious: in which project did you find timers less than 1 ms?

BTW, this change has a side effect:

* 0.2 ms becomes 1 ms -- fine, as expected;
* 1.2 ms becomes 2 ms -- probably not so nice.



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35672?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: I79de77c79af4d50d1eb9ca0c5417123ff760dca3
Gerrit-Change-Number: 35672
Gerrit-PatchSet: 1
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-CC: fixeria 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Wed, 24 Jan 2024 18:43:00 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in libosmocore[master]: Add logging category for libosmo-cc

2024-01-24 Thread pespin
Attention is currently required from: fixeria, jolly, laforge.

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

Change subject: Add logging category for libosmo-cc
..


Patch Set 3:

(1 comment)

File include/osmocom/core/logging.h:

https://gerrit.osmocom.org/c/libosmocore/+/35572/comment/9a99b8db_dfecfea3
PS2, Line 158: #defin
> Well, OSMO_NUM_DLIB is a special value reflecting the total number of those 
> global l-categories. It would be weird if anyone expected this value to 
> remain constant, and even more weird if it's used anywhere else than in 
> libosmocore.git.

Then it should be dropped from the public header file (and mark API breakage), 
unless we agree we can tell for sure nobody ever used it ourside of libosmocore.

I'm not saying we should unconditionally go for the dynamic API, I was just 
putting the different pros/cons on the table.
I think in general this system where libraries on top of libosmocore willing to 
use new log categories need to add new code in libosmocore is totally 
unsustainable in time and pollutes libosmocore "core" with lots of stuff which 
is not "core" in any way.



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35572?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: I9df433b2cfb51f04dbf16e9f8dee567a59ab5cb7
Gerrit-Change-Number: 35572
Gerrit-PatchSet: 3
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: jolly 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Wed, 24 Jan 2024 18:31:43 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: jolly 
Comment-In-Reply-To: laforge 
Comment-In-Reply-To: fixeria 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[S] Change in libosmocore[master]: Add logging category for libosmo-cc

2024-01-24 Thread fixeria
Attention is currently required from: jolly, laforge, pespin.

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

Change subject: Add logging category for libosmo-cc
..


Patch Set 3:

(1 comment)

File include/osmocom/core/logging.h:

https://gerrit.osmocom.org/c/libosmocore/+/35572/comment/80eed134_7731112c
PS2, Line 158: #defin
> However, still the API is being changed due to modification of OSMO_NUM_DLIB.

Well, `OSMO_NUM_DLIB` is a special value reflecting the total number of those 
global l-categories. It would be weird if anyone expected this value to remain 
constant, and even more weird if it's used anywhere else than in 
libosmocore.git.

Same applies to `_NUM_OSMO_ECU_CODECS`, `_OSMO_AUTH_ALG_NUM`, `_NUM_BTS_FEAT`, 
for instance: their existence does not imply that new elements shall not be 
added.

In this specific case we could even remove it completely and let the compiler 
calculate the size of `internal_cat[]` at compile-time for us.

> it makes much more sense that each library dynamically defines its own set of 
> log categories which can be configured through API,

I don't have a strong opinion here. To me it's just another approach, without 
`makes much more sense` or `totally correct`. It works for `libosmo-gprs` libs 
because so far only one project using it (`osmo-{pcu,sgsn}` may also join this 
list later). But it's inconvenient when multiple projects depend on a library 
and have to define the same set of logging categories for it. This is likely 
the case for `libosmo-cc`: `osmo-msc`, `osmocom-bb` [potentially], and 6 more 
repositories in https://gitea.osmocom.org/cc.

So, all in all, I see nothing really special about this API change and would go 
for having a global l-logging category here once (what this patch does), rather 
than having duplicate definitions in each of those 6+ projects.



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35572?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: I9df433b2cfb51f04dbf16e9f8dee567a59ab5cb7
Gerrit-Change-Number: 35572
Gerrit-PatchSet: 3
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: jolly 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 24 Jan 2024 18:23:30 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: jolly 
Comment-In-Reply-To: laforge 
Comment-In-Reply-To: pespin 
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


[S] Change in libosmocore[master]: Add logging category for libosmo-cc

2024-01-24 Thread pespin
Attention is currently required from: fixeria, jolly, laforge.

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

Change subject: Add logging category for libosmo-cc
..


Patch Set 3:

(1 comment)

File include/osmocom/core/logging.h:

https://gerrit.osmocom.org/c/libosmocore/+/35572/comment/53eb6a19_6c10ed3c
PS2, Line 158: #defin
> > IIRC there's a static array of size OSMO_NUM_DLIB […]
I see. However, still the API is being changed due to modification of 
OSMO_NUM_DLIB.

TBH, though there are exceptions, it makes much more sense that each library 
dynamically defines its own set of log categories which can be configured 
through API, like we did in libosmo-gprs-*. It looks totally weird that adding 
a new log category in some random library requires a bump in libosmocore...



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35572?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: I9df433b2cfb51f04dbf16e9f8dee567a59ab5cb7
Gerrit-Change-Number: 35572
Gerrit-PatchSet: 3
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: jolly 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Wed, 24 Jan 2024 17:43:22 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: jolly 
Comment-In-Reply-To: laforge 
Comment-In-Reply-To: fixeria 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[S] Change in libosmocore[master]: Add logging category for libosmo-cc

2024-01-24 Thread fixeria
Attention is currently required from: jolly, laforge, pespin.

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

Change subject: Add logging category for libosmo-cc
..


Patch Set 3:

(1 comment)

File include/osmocom/core/logging.h:

https://gerrit.osmocom.org/c/libosmocore/+/35572/comment/95877a5e_ff074dd5
PS2, Line 158: #defin
> > IIRC there's a static array of size OSMO_NUM_DLIB […]
... which does merge that `static const` array with the user-supplied array of 
logging categories in a backwards compatible way.



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35572?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: I9df433b2cfb51f04dbf16e9f8dee567a59ab5cb7
Gerrit-Change-Number: 35572
Gerrit-PatchSet: 3
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: jolly 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 24 Jan 2024 17:40:22 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: jolly 
Comment-In-Reply-To: laforge 
Comment-In-Reply-To: fixeria 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[S] Change in libosmocore[master]: Add logging category for libosmo-cc

2024-01-24 Thread fixeria
Attention is currently required from: jolly, laforge, pespin.

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

Change subject: Add logging category for libosmo-cc
..


Patch Set 3:

(1 comment)

File include/osmocom/core/logging.h:

https://gerrit.osmocom.org/c/libosmocore/+/35572/comment/264917a7_cdc40850
PS2, Line 158: #defin
> IIRC there's a static array of size OSMO_NUM_DLIB

Right, and the only user of this `static const` array is `log_init()` I 
mentioned above.



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35572?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: I9df433b2cfb51f04dbf16e9f8dee567a59ab5cb7
Gerrit-Change-Number: 35572
Gerrit-PatchSet: 3
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: jolly 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 24 Jan 2024 17:38:38 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: jolly 
Comment-In-Reply-To: laforge 
Comment-In-Reply-To: pespin 
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


[S] Change in libosmocore[master]: Add logging category for libosmo-cc

2024-01-24 Thread pespin
Attention is currently required from: fixeria, jolly, laforge.

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

Change subject: Add logging category for libosmo-cc
..


Patch Set 3:

(1 comment)

File include/osmocom/core/logging.h:

https://gerrit.osmocom.org/c/libosmocore/+/35572/comment/3b1b8835_1e340bcd
PS2, Line 158: #defin
> > this breaks ABI […]
IIRC there's a static array of size OSMO_NUM_DLIB



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35572?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: I9df433b2cfb51f04dbf16e9f8dee567a59ab5cb7
Gerrit-Change-Number: 35572
Gerrit-PatchSet: 3
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: jolly 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Wed, 24 Jan 2024 17:37:09 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: jolly 
Comment-In-Reply-To: laforge 
Comment-In-Reply-To: fixeria 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[S] Change in libosmocore[master]: Add logging category for libosmo-cc

2024-01-24 Thread fixeria
Attention is currently required from: jolly, laforge, pespin.

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

Change subject: Add logging category for libosmo-cc
..


Patch Set 3: Code-Review+1

(1 comment)

File include/osmocom/core/logging.h:

https://gerrit.osmocom.org/c/libosmocore/+/35572/comment/438c1216_fe043e10
PS2, Line 158: #defin
> this breaks ABI

I am wondering about potential consequences. Obviously, adding a new category 
here enlarges the `internal_cat[]` array. I assumed that this might result in 
logging categories being shifted and thus messed up in the logging output, but 
this does not seem to be the case if I understand the logic in `log_init()` 
correctly. It would first copy the user-supplied logging categories, and only 
then copy the internal ones from `internal_cat[]`.

So even if some application was compiled against an older version of 
libosmocore predating this commit, I don't see how a more recent libosmocore 
with DLCC would break logging in that application. Unless I am missing 
something, I think it should be fine to merge this commit as-is.



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35572?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: I9df433b2cfb51f04dbf16e9f8dee567a59ab5cb7
Gerrit-Change-Number: 35572
Gerrit-PatchSet: 3
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: jolly 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 24 Jan 2024 17:30:33 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: jolly 
Comment-In-Reply-To: laforge 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[L] Change in osmocom-bb[master]: mobile: VTY: rework data type/rate configuration commands

2024-01-24 Thread fixeria
fixeria has submitted this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/35663?usp=email )

 (

1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted 
one.
 )Change subject: mobile: VTY: rework data type/rate configuration commands
..

mobile: VTY: rework data type/rate configuration commands

Change-Id: I7393fce82613a57275033f5c47e16bbf708a3bfb
Related: OS#4396
---
M src/host/layer23/include/osmocom/bb/common/settings.h
M src/host/layer23/src/common/settings.c
M src/host/layer23/src/mobile/mnccms.c
M src/host/layer23/src/mobile/vty_interface.c
4 files changed, 207 insertions(+), 109 deletions(-)

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




diff --git a/src/host/layer23/include/osmocom/bb/common/settings.h 
b/src/host/layer23/include/osmocom/bb/common/settings.h
index a1c9b3e..1d3e53d 100644
--- a/src/host/layer23/include/osmocom/bb/common/settings.h
+++ b/src/host/layer23/include/osmocom/bb/common/settings.h
@@ -117,24 +117,58 @@
} locigprs;
 };
 
-enum data_call_type {
-   DATA_CALL_TYPE_ISDN,
-   DATA_CALL_TYPE_ANALOG,
-};
-
-enum data_call_rate {
-   DATA_CALL_RATE_V110_300,
-   DATA_CALL_RATE_V110_1200,
-   DATA_CALL_RATE_V110_2400,
-   DATA_CALL_RATE_V110_4800,
-   DATA_CALL_RATE_V110_9600,
-   DATA_CALL_RATE_V110_14400,
+/* Data (CSD) call type and rate, values like in the '' part of 
'AT+CBST'.
+ * See 3GPP TS 27.007, section 6.7 "Select bearer service type +CBST". */
+enum data_call_type_rate {
+   DATA_CALL_TR_AUTO   = 0,
+   DATA_CALL_TR_V21_300= 1,
+   DATA_CALL_TR_V22_1200   = 2,
+   DATA_CALL_TR_V23_1200_75= 3,
+   DATA_CALL_TR_V22bis_2400= 4,
+   DATA_CALL_TR_V26ter_2400= 5,
+   DATA_CALL_TR_V32_4800   = 6,
+   DATA_CALL_TR_V32_9600   = 7,
+   DATA_CALL_TR_V34_9600   = 12,
+   DATA_CALL_TR_V34_14400  = 14,
+   DATA_CALL_TR_V34_19200  = 15,
+   DATA_CALL_TR_V34_28800  = 16,
+   DATA_CALL_TR_V34_33600  = 17,
+   DATA_CALL_TR_V120_1200  = 34,
+   DATA_CALL_TR_V120_2400  = 36,
+   DATA_CALL_TR_V120_4800  = 38,
+   DATA_CALL_TR_V120_9600  = 39,
+   DATA_CALL_TR_V120_14400 = 43,
+   DATA_CALL_TR_V120_19200 = 47,
+   DATA_CALL_TR_V120_28800 = 48,
+   DATA_CALL_TR_V120_38400 = 49,
+   DATA_CALL_TR_V120_48000 = 50,
+   DATA_CALL_TR_V120_56000 = 51,
+   DATA_CALL_TR_V110_300   = 65,
+   DATA_CALL_TR_V110_1200  = 66,
+   DATA_CALL_TR_V110_2400  = 68,
+   DATA_CALL_TR_V110_4800  = 70,
+   DATA_CALL_TR_V110_9600  = 71,
+   DATA_CALL_TR_V110_14400 = 75,
+   DATA_CALL_TR_V110_19200 = 79,
+   DATA_CALL_TR_V110_28800 = 80,
+   DATA_CALL_TR_V110_38400 = 81,
+   DATA_CALL_TR_V110_48000 = 82,
+   DATA_CALL_TR_V110_56000 = 83,
+   DATA_CALL_TR_V110_64000 = 84,
+   DATA_CALL_TR_BTR_56000  = 115,
+   DATA_CALL_TR_BTR_64000  = 116,
+   DATA_CALL_TR_PIAFS32k_32000 = 120,
+   DATA_CALL_TR_PIAFS64k_64000 = 121,
+   DATA_CALL_TR_MMEDIA_28800   = 130,
+   DATA_CALL_TR_MMEDIA_32000   = 131,
+   DATA_CALL_TR_MMEDIA_33600   = 132,
+   DATA_CALL_TR_MMEDIA_56000   = 133,
+   DATA_CALL_TR_MMEDIA_64000   = 134,
 };

 /* Data (CSD) call parameters */
 struct data_call_params {
-   enum data_call_type type;
-   enum data_call_rate rate;
+   enum data_call_type_ratetype_rate;
enum gsm48_bcap_transp  transp;

/* async call parameters */
diff --git a/src/host/layer23/src/common/settings.c 
b/src/host/layer23/src/common/settings.c
index bc5d115..6bc5634 100644
--- a/src/host/layer23/src/common/settings.c
+++ b/src/host/layer23/src/common/settings.c
@@ -136,8 +136,7 @@
set->uplink_release_local = true;

set->call_params.data = (struct data_call_params) {
-   .type = DATA_CALL_TYPE_ISDN,
-   .rate = DATA_CALL_RATE_V110_9600,
+   .type_rate = DATA_CALL_TR_V110_9600,
.transp = GSM48_BCAP_TR_TRANSP,

/* async call parameters (8-N-1) */
diff --git a/src/host/layer23/src/mobile/mnccms.c 
b/src/host/layer23/src/mobile/mnccms.c
index fa3b284..95d7f0d 100644
--- a/src/host/layer23/src/mobile/mnccms.c
+++ b/src/host/layer23/src/mobile/mnccms.c
@@ -199,12 +199,95 @@
mncc->bearer_cap.mode = GSM48_BCAP_TMOD_CIRCUIT;
 }

+static const struct bcap_data_set {
+   

[M] Change in osmocom-bb[master]: mobile: add a separate logging category for CSD

2024-01-24 Thread fixeria
fixeria has submitted this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/35656?usp=email )

Change subject: mobile: add a separate logging category for CSD
..

mobile: add a separate logging category for CSD

Change-Id: If9db0759aeb4324ace9ae258c852787f37897d83
Related: OS#4396
---
M src/host/layer23/include/osmocom/bb/common/logging.h
M src/host/layer23/src/common/logging.c
M src/host/layer23/src/mobile/tch_data.c
M src/host/layer23/src/mobile/tch_data_sock.c
4 files changed, 36 insertions(+), 19 deletions(-)

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




diff --git a/src/host/layer23/include/osmocom/bb/common/logging.h 
b/src/host/layer23/include/osmocom/bb/common/logging.h
index 40a7e81..3920d2e 100644
--- a/src/host/layer23/include/osmocom/bb/common/logging.h
+++ b/src/host/layer23/include/osmocom/bb/common/logging.h
@@ -28,6 +28,7 @@
DPRIM,
DLUA,
DGAPK,
+   DCSD,
DTUN,
DRLCMAC,
DLLC,
diff --git a/src/host/layer23/src/common/logging.c 
b/src/host/layer23/src/common/logging.c
index 0401360..283b7f1 100644
--- a/src/host/layer23/src/common/logging.c
+++ b/src/host/layer23/src/common/logging.c
@@ -159,6 +159,12 @@
.color = "\033[0;36m",
.enabled = 1, .loglevel = LOGL_DEBUG,
},
+   [DCSD] = {
+   .name = "DCSD",
+   .description = "Circuit Switched Data",
+   .color = "\033[0;36m",
+   .enabled = 1, .loglevel = LOGL_DEBUG,
+   },
[DTUN] = {
.name = "DTUN",
.description = "Tunnel interface",
diff --git a/src/host/layer23/src/mobile/tch_data.c 
b/src/host/layer23/src/mobile/tch_data.c
index 6ee89dc..7169efa 100644
--- a/src/host/layer23/src/mobile/tch_data.c
+++ b/src/host/layer23/src/mobile/tch_data.c
@@ -81,7 +81,7 @@
 {
struct tch_data_state *state = (struct tch_data_state *)priv;

-   LOGP(DL1C, LOGL_DEBUG, "%s(): [flags=0x%08x] %s\n",
+   LOGP(DCSD, LOGL_DEBUG, "%s(): [flags=0x%08x] %s\n",
 __func__, flags, msgb_hexdump(msg));

if (state->sock != NULL && msgb_length(msg) > 0)
@@ -96,7 +96,7 @@

tch_csd_sock_recv(state->sock, msg);

-   LOGP(DL1C, LOGL_DEBUG, "%s(): [n_bytes=%u/%u] %s\n",
+   LOGP(DCSD, LOGL_DEBUG, "%s(): [n_bytes=%u/%u] %s\n",
 __func__, msg->len, msg->data_len, msgb_hexdump(msg));
 }

@@ -166,7 +166,7 @@

tch_csd_sock_recv(state->sock, msg);
if (msgb_length(msg) < buf_size) {
-   LOGP(DL1C, LOGL_NOTICE,
+   LOGP(DCSD, LOGL_NOTICE,
 "%s(): not enough bytes for sync Tx (%u < %zu)\n",
 __func__, msgb_length(msg), buf_size);
}
@@ -189,7 +189,7 @@

 static void tch_v110_ta_status_update_cb(void *priv, unsigned int status)
 {
-   LOGP(DL1C, LOGL_DEBUG, "%s(): [status=0x%08x]\n", __func__, status);
+   LOGP(DCSD, LOGL_DEBUG, "%s(): [status=0x%08x]\n", __func__, status);

/* TODO: update status lines of the soft-UART (if state.suart != NULL) 
*/
 }
@@ -233,7 +233,7 @@
 * signalling rate shall be adapted to a synchronous 600 bit/s stream. 
*/
case BCAP_RATE(GSM48_BCAP_IR_8k, GSM48_BCAP_UR_300):
default:
-   LOGP(DCC, LOGL_ERROR,
+   LOGP(DCSD, LOGL_ERROR,
 "%s(): IR 0x%02x / UR 0x%02x combination is not 
supported\n",
 __func__, bcap->data.interm_rate, bcap->data.user_rate);
return NULL;
@@ -367,20 +367,20 @@
 static int tch_data_check_bcap(const struct gsm_mncc_bearer_cap *bcap)
 {
if (bcap == NULL) {
-   LOGP(DL1C, LOGL_ERROR,
+   LOGP(DCSD, LOGL_ERROR,
 "%s(): CC transaction without BCap\n",
 __func__);
return -ENODEV;
}

if (bcap->mode != GSM48_BCAP_TMOD_CIRCUIT) {
-   LOGP(DCC, LOGL_ERROR,
+   LOGP(DCSD, LOGL_ERROR,
 "%s(): Transfer mode 0x%02x is not supported\n",
 __func__, bcap->mode);
return -ENOTSUP;
}
if (bcap->coding != GSM48_BCAP_CODING_GSM_STD) {
-   LOGP(DCC, LOGL_ERROR,
+   LOGP(DCSD, LOGL_ERROR,
 "%s(): Coding standard 0x%02x is not supported\n",
 __func__, bcap->coding);
return -ENOTSUP;
@@ -392,26 +392,26 @@
case GSM48_BCAP_ITCAP_FAX_G3:
break;
default:
-   LOGP(DCC, LOGL_ERROR,
+   LOGP(DCSD, LOGL_ERROR,
 "%s(): Information transfer capability 0x%02x is not 
supported\n",
 

[M] Change in osmocom-bb[master]: mobile: VTY: use 'enum gsm48_bcap_transp' from libosmogsm

2024-01-24 Thread fixeria
fixeria has submitted this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/35661?usp=email )

 (

1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted 
one.
 )Change subject: mobile: VTY: use 'enum gsm48_bcap_transp' from libosmogsm
..

mobile: VTY: use 'enum gsm48_bcap_transp' from libosmogsm

Change-Id: Iebc0692f17a5a5d04e57d74a720db52775937bdd
Related: OS#4396
---
M src/host/layer23/include/osmocom/bb/common/settings.h
M src/host/layer23/src/common/settings.c
M src/host/layer23/src/mobile/mnccms.c
M src/host/layer23/src/mobile/vty_interface.c
4 files changed, 20 insertions(+), 33 deletions(-)

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




diff --git a/src/host/layer23/include/osmocom/bb/common/settings.h 
b/src/host/layer23/include/osmocom/bb/common/settings.h
index 3873611..ecebae8 100644
--- a/src/host/layer23/include/osmocom/bb/common/settings.h
+++ b/src/host/layer23/include/osmocom/bb/common/settings.h
@@ -6,6 +6,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 

@@ -130,19 +131,11 @@
DATA_CALL_RATE_V110_14400,
 };

-/* Connection Element (transparency) */
-enum data_call_ce {
-   DATA_CALL_CE_TRANSP,
-   DATA_CALL_CE_TRANSP_PREF,
-   DATA_CALL_CE_NON_TRANSP,
-   DATA_CALL_CE_NON_TRANSP_PREF,
-};
-
 /* Data (CSD) call parameters */
 struct data_call_params {
-   enum data_call_type type;
-   enum data_call_rate rate;
-   enum data_call_ce   ce;
+   enum data_call_type type;
+   enum data_call_rate rate;
+   enum gsm48_bcap_transp  transp;
 };

 struct gsm_settings {
diff --git a/src/host/layer23/src/common/settings.c 
b/src/host/layer23/src/common/settings.c
index 3fca52d..6ffb095 100644
--- a/src/host/layer23/src/common/settings.c
+++ b/src/host/layer23/src/common/settings.c
@@ -138,7 +138,7 @@
set->call_params.data = (struct data_call_params) {
.type = DATA_CALL_TYPE_ISDN,
.rate = DATA_CALL_RATE_V110_9600,
-   .ce = DATA_CALL_CE_TRANSP,
+   .transp = GSM48_BCAP_TR_TRANSP,
};

return 0;
diff --git a/src/host/layer23/src/mobile/mnccms.c 
b/src/host/layer23/src/mobile/mnccms.c
index c03eed5..4bdb845 100644
--- a/src/host/layer23/src/mobile/mnccms.c
+++ b/src/host/layer23/src/mobile/mnccms.c
@@ -218,7 +218,7 @@
.rate_adaption = GSM48_BCAP_RA_V110_X30,
.sig_access = GSM48_BCAP_SA_I440_I450,
.async = 1,
-   /* .transp is set below */
+   .transp = cp->transp,
.nr_data_bits = 8,
.parity = GSM48_BCAP_PAR_NONE,
.nr_stop_bits = 1,
@@ -284,22 +284,6 @@
break;
}

-   /* Connection element (octet 6c) */
-   switch (cp->ce) {
-   case DATA_CALL_CE_TRANSP:
-   bcap->data.transp = GSM48_BCAP_TR_TRANSP;
-   break;
-   case DATA_CALL_CE_TRANSP_PREF:
-   bcap->data.transp = GSM48_BCAP_TR_TR_PREF;
-   break;
-   case DATA_CALL_CE_NON_TRANSP:
-   bcap->data.transp = GSM48_BCAP_TR_RLP;
-   break;
-   case DATA_CALL_CE_NON_TRANSP_PREF:
-   bcap->data.transp = GSM48_BCAP_TR_RLP_PREF;
-   break;
-   }
-
/* FAX calls are special (see 3GPP TS 24.008, Annex D.3) */
if (call_type == GSM_CALL_T_DATA_FAX) {
bcap->data.rate_adaption = GSM48_BCAP_RA_NONE;
diff --git a/src/host/layer23/src/mobile/vty_interface.c 
b/src/host/layer23/src/mobile/vty_interface.c
index 6293768..05a20e4 100644
--- a/src/host/layer23/src/mobile/vty_interface.c
+++ b/src/host/layer23/src/mobile/vty_interface.c
@@ -741,14 +741,14 @@

if (!strcmp(argv[1], "transparent")) {
if (argc > 2)
-   cp->ce = DATA_CALL_CE_TRANSP_PREF;
+   cp->transp = GSM48_BCAP_TR_TR_PREF;
else
-   cp->ce = DATA_CALL_CE_TRANSP;
+   cp->transp = GSM48_BCAP_TR_TRANSP;
} else if (!strcmp(argv[1], "non-transparent")) {
if (argc > 2)
-   cp->ce = DATA_CALL_CE_NON_TRANSP_PREF;
+   cp->transp = GSM48_BCAP_TR_RLP_PREF;
else
-   cp->ce = DATA_CALL_CE_NON_TRANSP;
+   cp->transp = GSM48_BCAP_TR_RLP;
} else { /* should not happen */
return CMD_WARNING;
}

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

[M] Change in osmocom-bb[master]: mobile: VTY: make soft-UART parameters configurable

2024-01-24 Thread fixeria
fixeria has submitted this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/35662?usp=email )

 (

1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted 
one.
 )Change subject: mobile: VTY: make soft-UART parameters configurable
..

mobile: VTY: make soft-UART parameters configurable

Change-Id: I48bb58aaf1101fbc0e58db3fb1100927e506ede2
Related: OS#4396
---
M src/host/layer23/include/osmocom/bb/common/settings.h
M src/host/layer23/src/common/settings.c
M src/host/layer23/src/mobile/mnccms.c
M src/host/layer23/src/mobile/vty_interface.c
4 files changed, 156 insertions(+), 4 deletions(-)

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




diff --git a/src/host/layer23/include/osmocom/bb/common/settings.h 
b/src/host/layer23/include/osmocom/bb/common/settings.h
index ecebae8..a1c9b3e 100644
--- a/src/host/layer23/include/osmocom/bb/common/settings.h
+++ b/src/host/layer23/include/osmocom/bb/common/settings.h
@@ -136,6 +136,12 @@
enum data_call_type type;
enum data_call_rate rate;
enum gsm48_bcap_transp  transp;
+
+   /* async call parameters */
+   boolis_async;
+   unsigned intnr_stop_bits;
+   unsigned intnr_data_bits;
+   enum gsm48_bcap_parity  parity;
 };

 struct gsm_settings {
diff --git a/src/host/layer23/src/common/settings.c 
b/src/host/layer23/src/common/settings.c
index 6ffb095..bc5d115 100644
--- a/src/host/layer23/src/common/settings.c
+++ b/src/host/layer23/src/common/settings.c
@@ -139,6 +139,12 @@
.type = DATA_CALL_TYPE_ISDN,
.rate = DATA_CALL_RATE_V110_9600,
.transp = GSM48_BCAP_TR_TRANSP,
+
+   /* async call parameters (8-N-1) */
+   .is_async = true,
+   .nr_stop_bits = 1,
+   .nr_data_bits = 8,
+   .parity = GSM48_BCAP_PAR_NONE,
};

return 0;
diff --git a/src/host/layer23/src/mobile/mnccms.c 
b/src/host/layer23/src/mobile/mnccms.c
index 4bdb845..fa3b284 100644
--- a/src/host/layer23/src/mobile/mnccms.c
+++ b/src/host/layer23/src/mobile/mnccms.c
@@ -217,11 +217,11 @@
/* TODO: make these fields configurable via *set */
.rate_adaption = GSM48_BCAP_RA_V110_X30,
.sig_access = GSM48_BCAP_SA_I440_I450,
-   .async = 1,
+   .async = cp->is_async,
.transp = cp->transp,
-   .nr_data_bits = 8,
-   .parity = GSM48_BCAP_PAR_NONE,
-   .nr_stop_bits = 1,
+   .nr_data_bits = cp->nr_data_bits,
+   .nr_stop_bits = cp->nr_stop_bits,
+   .parity = cp->parity,
/* .user_rate is set below */
/* .interm_rate is set below */
},
diff --git a/src/host/layer23/src/mobile/vty_interface.c 
b/src/host/layer23/src/mobile/vty_interface.c
index 05a20e4..4c2263a 100644
--- a/src/host/layer23/src/mobile/vty_interface.c
+++ b/src/host/layer23/src/mobile/vty_interface.c
@@ -756,6 +756,119 @@
return CMD_SUCCESS;
 }

+DEFUN(call_params_data_sync_async,
+  call_params_data_sync_async_cmd,
+  CALL_PARAMS_DATA_CMD " (sync|async)",
+  CALL_PARAMS_DATA_CMD_DESC
+  "Synchronous connection (always used for FAX calls)\n"
+  "Asynchronous connection (does not apply to FAX calls)\n")
+{
+   struct osmocom_ms *ms;
+   struct gsm_settings *set;
+   struct data_call_params *cp;
+
+   ms = l23_vty_get_ms(argv[0], vty);
+   if (!ms)
+   return CMD_WARNING;
+   set = >settings;
+   cp = >call_params.data;
+
+   cp->is_async = (argv[1][0] == 'a');
+
+   return CMD_SUCCESS;
+}
+
+#define CALL_PARAMS_DATA_ASYNC_CMD \
+   CALL_PARAMS_DATA_CMD " async"
+#define CALL_PARAMS_DATA_ASYNC_CMD_DESC \
+   CALL_PARAMS_DATA_CMD_DESC \
+   "Asynchronous connection params (does not apply to FAX calls)\n"
+
+DEFUN(call_params_data_async_nr_stop_bits,
+  call_params_data_async_nr_stop_bits_cmd,
+  CALL_PARAMS_DATA_ASYNC_CMD " nr-stop-bits <1-2>",
+  CALL_PARAMS_DATA_ASYNC_CMD_DESC
+  "Number of stop bits (soft-UART config)\n"
+  "Number of stop bits (default: 1)\n")
+{
+   struct osmocom_ms *ms;
+   struct gsm_settings *set;
+   struct data_call_params *cp;
+
+   ms = l23_vty_get_ms(argv[0], vty);
+   if (!ms)
+   return CMD_WARNING;
+   set = >settings;
+   cp = >call_params.data;
+
+   cp->nr_stop_bits = atoi(argv[1]);
+
+   return CMD_SUCCESS;
+}

[S] Change in osmocom-bb[master]: mobile: handle V.24 line status updates from V.110 TA

2024-01-24 Thread fixeria
fixeria has submitted this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/35640?usp=email )

Change subject: mobile: handle V.24 line status updates from V.110 TA
..

mobile: handle V.24 line status updates from V.110 TA

Change-Id: I05ba2e10fefe3cae687831b5ced971aa244ad336
Related: OS#4396
---
M src/host/layer23/src/mobile/tch_data.c
1 file changed, 36 insertions(+), 2 deletions(-)

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




diff --git a/src/host/layer23/src/mobile/tch_data.c 
b/src/host/layer23/src/mobile/tch_data.c
index 7169efa..451f267 100644
--- a/src/host/layer23/src/mobile/tch_data.c
+++ b/src/host/layer23/src/mobile/tch_data.c
@@ -187,11 +187,35 @@
osmo_soft_uart_tx_ubits(state->suart, buf, buf_size);
 }

+static const struct {
+   enum osmo_v110_ta_circuit c;
+   enum osmo_soft_uart_status s;
+} tch_v110_circuit_map[] = {
+   { OSMO_V110_TA_C_106, OSMO_SUART_STATUS_F_CTS },
+   { OSMO_V110_TA_C_107, OSMO_SUART_STATUS_F_DSR },
+   { OSMO_V110_TA_C_109, OSMO_SUART_STATUS_F_DCD },
+};
+
 static void tch_v110_ta_status_update_cb(void *priv, unsigned int status)
 {
-   LOGP(DCSD, LOGL_DEBUG, "%s(): [status=0x%08x]\n", __func__, status);
+   const struct tch_data_state *state = (struct tch_data_state *)priv;

-   /* TODO: update status lines of the soft-UART (if state.suart != NULL) 
*/
+   LOGP(DCSD, LOGL_DEBUG, "V.110 TA status mask=0x%08x\n", status);
+
+   for (unsigned int i = 0; i < ARRAY_SIZE(tch_v110_circuit_map); i++) {
+   enum osmo_v110_ta_circuit c = tch_v110_circuit_map[i].c;
+   enum osmo_soft_uart_status s = tch_v110_circuit_map[i].s;
+   bool is_on = (status & (1 << c)) != 0;
+
+   LOGP(DCSD, LOGL_DEBUG, "V.110 TA circuit %s (%s) is %s\n",
+osmo_v110_ta_circuit_name(c),
+osmo_v110_ta_circuit_desc(c),
+is_on ? "ON" : "OFF");
+
+   /* update status lines of the soft-UART */
+   if (state->suart != NULL)
+   osmo_soft_uart_set_status_line(state->suart, s, is_on);
+   }
 }

 struct osmo_v110_ta *tch_v110_ta_alloc(struct osmocom_ms *ms,

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I05ba2e10fefe3cae687831b5ced971aa244ad336
Gerrit-Change-Number: 35640
Gerrit-PatchSet: 5
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-MessageType: merged


[S] Change in osmocom-bb[master]: mobile: handle V.24 line status updates from V.110 TA

2024-01-24 Thread fixeria
Attention is currently required from: laforge.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/35640?usp=email )

Change subject: mobile: handle V.24 line status updates from V.110 TA
..


Patch Set 5: Code-Review+2

(1 comment)

File src/host/layer23/src/mobile/tch_data.c:

https://gerrit.osmocom.org/c/osmocom-bb/+/35640/comment/ff805358_8b36fb52
PS2, Line 210:  LOGP(DL1C, LOGL_NOTICE, "V.110 TA circuit %s (%s) is 
%s\n",
> RTS/CTS flow control will happen *all the time* in any realistic scenario 
> where you have a backlog o […]
Ack. Let's simply use `DEBUG` then.



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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I05ba2e10fefe3cae687831b5ced971aa244ad336
Gerrit-Change-Number: 35640
Gerrit-PatchSet: 5
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Wed, 24 Jan 2024 16:55:45 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: laforge 
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


[S] Change in osmocom-bb[master]: mobile: handle V.24 line status updates from V.110 TA

2024-01-24 Thread pespin
Attention is currently required from: fixeria.

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

Change subject: mobile: handle V.24 line status updates from V.110 TA
..


Patch Set 5: Code-Review+1


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I05ba2e10fefe3cae687831b5ced971aa244ad336
Gerrit-Change-Number: 35640
Gerrit-PatchSet: 5
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Wed, 24 Jan 2024 16:51:46 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libosmocore[master]: Add logging category for libosmo-cc

2024-01-24 Thread jolly
Attention is currently required from: laforge, pespin.

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

Change subject: Add logging category for libosmo-cc
..


Patch Set 3:

(1 comment)

File include/osmocom/core/logging.h:

https://gerrit.osmocom.org/c/libosmocore/+/35572/comment/0db126ea_7bfbbd60
PS2, Line 158: #defin
> That's why I proposed adding the category dynamically if it makes sense, 
> because it avoids breaking  […]
Will work on it next weekend. Abandon this patch then



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35572?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: I9df433b2cfb51f04dbf16e9f8dee567a59ab5cb7
Gerrit-Change-Number: 35572
Gerrit-PatchSet: 3
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 24 Jan 2024 16:50:44 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[L] Change in ...osmo-epdg[master]: Introduce ue_fsm

2024-01-24 Thread pespin
Attention is currently required from: dexter.

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

Change subject: Introduce ue_fsm
..


Patch Set 1:

(1 comment)

File src/ue_fsm.erl:

https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35659/comment/56a57521_4b621c7c
PS1, Line 83: {stop, Err, Data}
> Maybe a default case would be a good idea? I just mentioning this since  […]
Thanks for the feedback/tip. I know lots of stuff needs to be still improved, 
but I plan to do that in small steps while adding functionalities and tests.
Ideally I'd do that in one run but realistically it's not possible given all 
the stuff that needs to be implemented and our current level of erlang 
(learning as we write).

Right now I'm at the time of writing a proof of concept code passing the most 
usual scenarios. Once that's in place we can start thinking at improving error 
cases.



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

Gerrit-Project: erlang/osmo-epdg
Gerrit-Branch: master
Gerrit-Change-Id: I0c960c4c250458384ed706a99582ec52083019f6
Gerrit-Change-Number: 35659
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: laforge 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Wed, 24 Jan 2024 16:49:51 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: dexter 
Gerrit-MessageType: comment


[M] Change in osmocom-bb[master]: mobile: VTY: use 'enum gsm48_bcap_transp' from libosmogsm

2024-01-24 Thread fixeria
Hello Jenkins Builder, laforge, pespin,

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

https://gerrit.osmocom.org/c/osmocom-bb/+/35661?usp=email

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

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

The change is no longer submittable: Verified is unsatisfied now.


Change subject: mobile: VTY: use 'enum gsm48_bcap_transp' from libosmogsm
..

mobile: VTY: use 'enum gsm48_bcap_transp' from libosmogsm

Change-Id: Iebc0692f17a5a5d04e57d74a720db52775937bdd
Related: OS#4396
---
M src/host/layer23/include/osmocom/bb/common/settings.h
M src/host/layer23/src/common/settings.c
M src/host/layer23/src/mobile/mnccms.c
M src/host/layer23/src/mobile/vty_interface.c
4 files changed, 20 insertions(+), 33 deletions(-)


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Iebc0692f17a5a5d04e57d74a720db52775937bdd
Gerrit-Change-Number: 35661
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: newpatchset


[S] Change in osmocom-bb[master]: mobile: handle V.24 line status updates from V.110 TA

2024-01-24 Thread fixeria
Attention is currently required from: fixeria.

Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmocom-bb/+/35640?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: mobile: handle V.24 line status updates from V.110 TA
..

mobile: handle V.24 line status updates from V.110 TA

Change-Id: I05ba2e10fefe3cae687831b5ced971aa244ad336
Related: OS#4396
---
M src/host/layer23/src/mobile/tch_data.c
1 file changed, 36 insertions(+), 2 deletions(-)


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I05ba2e10fefe3cae687831b5ced971aa244ad336
Gerrit-Change-Number: 35640
Gerrit-PatchSet: 5
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-Attention: fixeria 
Gerrit-MessageType: newpatchset


[M] Change in osmocom-bb[master]: mobile: VTY: make soft-UART parameters configurable

2024-01-24 Thread fixeria
Hello Jenkins Builder, laforge, pespin,

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

https://gerrit.osmocom.org/c/osmocom-bb/+/35662?usp=email

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

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

The change is no longer submittable: Verified is unsatisfied now.


Change subject: mobile: VTY: make soft-UART parameters configurable
..

mobile: VTY: make soft-UART parameters configurable

Change-Id: I48bb58aaf1101fbc0e58db3fb1100927e506ede2
Related: OS#4396
---
M src/host/layer23/include/osmocom/bb/common/settings.h
M src/host/layer23/src/common/settings.c
M src/host/layer23/src/mobile/mnccms.c
M src/host/layer23/src/mobile/vty_interface.c
4 files changed, 156 insertions(+), 4 deletions(-)


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I48bb58aaf1101fbc0e58db3fb1100927e506ede2
Gerrit-Change-Number: 35662
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: newpatchset


[L] Change in osmocom-bb[master]: mobile: VTY: rework data type/rate configuration commands

2024-01-24 Thread fixeria
Hello Jenkins Builder, laforge, pespin,

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

https://gerrit.osmocom.org/c/osmocom-bb/+/35663?usp=email

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

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

The change is no longer submittable: Verified is unsatisfied now.


Change subject: mobile: VTY: rework data type/rate configuration commands
..

mobile: VTY: rework data type/rate configuration commands

Change-Id: I7393fce82613a57275033f5c47e16bbf708a3bfb
Related: OS#4396
---
M src/host/layer23/include/osmocom/bb/common/settings.h
M src/host/layer23/src/common/settings.c
M src/host/layer23/src/mobile/mnccms.c
M src/host/layer23/src/mobile/vty_interface.c
4 files changed, 207 insertions(+), 109 deletions(-)


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I7393fce82613a57275033f5c47e16bbf708a3bfb
Gerrit-Change-Number: 35663
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: newpatchset


[L] Change in ...osmo-epdg[master]: Introduce ue_fsm

2024-01-24 Thread dexter
Attention is currently required from: pespin.

dexter has posted comments on this change. ( 
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35659?usp=email )

Change subject: Introduce ue_fsm
..


Patch Set 1: Code-Review+1

(5 comments)

Patchset:

PS1:
I have worked that through, in particular the gen_statem implementation was 
interesting. Now I know how to implement an FSM in erlang.


File src/gsup_server.erl:

https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35659/comment/85f97299_d0507e5b
PS1, Line 53:   ues = sets:new()
the other record members have a comment, maybe we should add a comment for 
member "ues" too? (it probably refers to multiple UEs)


https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35659/comment/31f1f8b8_f393c7d4
PS1, Line 119:  {reply, error, not_implemented}.
This function is deprecated?


https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35659/comment/138d5469_3ecaf159
PS1, Line 283: find_gsups_ue_by_imsi(Imsi, State) ->
("gsups" stands for GSUP-Server I guess.)


File src/ue_fsm.erl:

https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35659/comment/10836e2c_58ff590d
PS1, Line 83: {stop, Err, Data}
Maybe a default case would be a good idea? I just mentioning this since

https://www.erlang.org/doc/man/gen_statem.html

mentions:

"Postponing an event corresponds to not matching it in a receive statement, and 
changing states corresponds to entering a new receive statement."

So if auth_handler:auth_request() returns something different than {ok, _} or 
{error, _}, maybe {foo, _} for example, then the event would be accidentally 
postponed?



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

Gerrit-Project: erlang/osmo-epdg
Gerrit-Branch: master
Gerrit-Change-Id: I0c960c4c250458384ed706a99582ec52083019f6
Gerrit-Change-Number: 35659
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: laforge 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 24 Jan 2024 16:38:54 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libosmocore[master]: Prevent poll() in select.c to timeout too early

2024-01-24 Thread pespin
Attention is currently required from: jolly.

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

Change subject: Prevent poll() in select.c to timeout too early
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35672?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: I79de77c79af4d50d1eb9ca0c5417123ff760dca3
Gerrit-Change-Number: 35672
Gerrit-PatchSet: 1
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Wed, 24 Jan 2024 16:24:52 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libosmocore[master]: Prevent poll() in select.c to timeout too early

2024-01-24 Thread jolly
jolly has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/35672?usp=email )


Change subject: Prevent poll() in select.c to timeout too early
..

Prevent poll() in select.c to timeout too early

Adjust osmo_timers_nearest_ms() to round up the remaining time.

Note that poll() has a granularity of 1 millisecond.

Previously, when rounding down the remaining time, osmo_select_main()
would return too early, before the nearest timer timed out.
Consequently, the main loop repeatedly called osmo_select_main() until
the timer actually timed out, resulting in excessive CPU usage.
By modifying osmo_timers_nearest_ms() to round up the remaining time,
we ensure accurate timeout calculations, preventing unnecessary CPU
consumption during the main loop.

Related: OS#6339
Change-Id: I79de77c79af4d50d1eb9ca0c5417123ff760dca3
---
M src/core/timer.c
1 file changed, 28 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/72/35672/1

diff --git a/src/core/timer.c b/src/core/timer.c
index 20d87a0..4229c5a 100644
--- a/src/core/timer.c
+++ b/src/core/timer.c
@@ -190,8 +190,13 @@
if (!nearest_p)
return -1;

+   /* By adding 999 milliseconds, we ensure rounding up to the nearest
+* whole millisecond. This approach prevents the return of 0 when the
+* timer is still active, and it guarantees that the calling process
+* does not wait for a duration shorter than the time remaining on the
+* timer. */
nearest_ms = nearest_p->tv_sec * 1000;
-   nearest_ms += nearest_p->tv_usec / 1000;
+   nearest_ms += (nearest_p->tv_usec + 999) / 1000;

return nearest_ms;
 }

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35672?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: I79de77c79af4d50d1eb9ca0c5417123ff760dca3
Gerrit-Change-Number: 35672
Gerrit-PatchSet: 1
Gerrit-Owner: jolly 
Gerrit-MessageType: newchange


[S] Change in osmo-sgsn[master]: gsup: Use new libosmogsm struct osmo_gsup_pdp_info fields

2024-01-24 Thread fixeria
Attention is currently required from: lynxis lazus, neels, pespin.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/35632?usp=email )

Change subject: gsup: Use new libosmogsm struct osmo_gsup_pdp_info fields
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I0d03d368e73ab62ec631420769f6af91f2ff9987
Gerrit-Change-Number: 35632
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: neels 
Gerrit-Attention: neels 
Gerrit-Attention: pespin 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Wed, 24 Jan 2024 15:29:46 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-msc[master]: vlr: Use new libosmogsm struct osmo_gsup_pdp_info fields

2024-01-24 Thread pespin
Attention is currently required from: lynxis lazus, neels.

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

Change subject: vlr: Use new libosmogsm struct osmo_gsup_pdp_info fields
..


Patch Set 1:

(1 comment)

Patchset:

PS1:
ping



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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ia002fd6e0334d56de34d352a0bf1a8604e2e9fd3
Gerrit-Change-Number: 35631
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: neels 
Gerrit-Attention: neels 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Wed, 24 Jan 2024 15:17:38 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in osmo-sgsn[master]: gsup: Use new libosmogsm struct osmo_gsup_pdp_info fields

2024-01-24 Thread pespin
Attention is currently required from: fixeria, lynxis lazus, neels.

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

Change subject: gsup: Use new libosmogsm struct osmo_gsup_pdp_info fields
..


Patch Set 1:

(1 comment)

Patchset:

PS1:
ping



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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I0d03d368e73ab62ec631420769f6af91f2ff9987
Gerrit-Change-Number: 35632
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: neels 
Gerrit-Attention: neels 
Gerrit-Attention: fixeria 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Wed, 24 Jan 2024 15:17:27 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[L] Change in osmo-ttcn3-hacks[master]: DIAMETER: Split Gy and Gx messages to their own TS files

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


Change subject: DIAMETER: Split Gy and Gx messages to their own TS files
..

DIAMETER: Split Gy and Gx messages to their own TS files

Those interfaces reuse messages from other Diameter RFCs, but changing
the contents of the messages, eg some Mandatory fields like
Service-Context-Id which are mandatory in RFC5006, doesn't even appear
in Gx CCR in TS 29.212.

Keeping them well separated helps in avoiding confusion on users fo the
messages.

Change-Id: Ibe0d5f263813d5083e020c942283f214983162b4
---
M ggsn_tests/GGSN_Tests.ttcn
M ggsn_tests/gen_links.sh
M library/DIAMETER_Templates.ttcn
A library/DIAMETER_ts29_212_Templates.ttcn
A library/DIAMETER_ts32_299_Templates.ttcn
M pgw/PGW_Tests.ttcn
M pgw/gen_links.sh
7 files changed, 262 insertions(+), 187 deletions(-)



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

diff --git a/ggsn_tests/GGSN_Tests.ttcn b/ggsn_tests/GGSN_Tests.ttcn
index a1aab9b..d7de443 100644
--- a/ggsn_tests/GGSN_Tests.ttcn
+++ b/ggsn_tests/GGSN_Tests.ttcn
@@ -34,7 +34,9 @@

import from DIAMETER_Types all;
import from DIAMETER_Templates all;
+   import from DIAMETER_ts29_212_Templates all;
import from DIAMETER_ts29_272_Templates all;
+   import from DIAMETER_ts32_299_Templates all;
import from DIAMETER_Emulation all;

const integer GTP0_PORT := 3386;
diff --git a/ggsn_tests/gen_links.sh b/ggsn_tests/gen_links.sh
index b51620e..4981e64 100755
--- a/ggsn_tests/gen_links.sh
+++ b/ggsn_tests/gen_links.sh
@@ -61,7 +61,7 @@
 FILES="Misc_Helpers.ttcn General_Types.ttcn GSM_Types.ttcn Osmocom_Types.ttcn 
Native_Functions.ttcn Native_FunctionDefs.cc IPCP_Types.ttcn PAP_Types.ttcn "
 FILES+="GTP_CodecPort.ttcn GTP_CodecPort_CtrlFunct.ttcn 
GTP_CodecPort_CtrlFunctDef.cc GTP_Templates.ttcn Osmocom_Gb_Types.ttcn "
 FILES+="DIAMETER_Types.ttcn DIAMETER_CodecPort.ttcn 
DIAMETER_CodecPort_CtrlFunct.ttcn DIAMETER_CodecPort_CtrlFunctDef.cc 
DIAMETER_Emulation.ttcn "
-FILES+="DIAMETER_Templates.ttcn DIAMETER_ts29_272_Templates.ttcn "
+FILES+="DIAMETER_Templates.ttcn DIAMETER_ts29_212_Templates.ttcn 
DIAMETER_ts29_272_Templates.ttcn DIAMETER_ts32_299_Templates.ttcn "
 FILES+="Osmocom_VTY_Functions.ttcn "
 gen_links $DIR $FILES

diff --git a/library/DIAMETER_Templates.ttcn b/library/DIAMETER_Templates.ttcn
index 05b63d2..82a433c 100644
--- a/library/DIAMETER_Templates.ttcn
+++ b/library/DIAMETER_Templates.ttcn
@@ -102,10 +102,9 @@
DIAMETER_ERROR_EAP_CODE_UNKNOWN (5048)
 };

-/* Gy : 3GPP TS 32.299 7.1.6, RFC4006 3.1 */
+/* RFC4006 3.1 */
 const uint32_t c_DIAMETER_CREDIT_CONTROL_AID := 4;

-const uint32_t c_DIAMETER_3GPP_Gx_AID := 16777238;
 const uint32_t c_DIAMETER_3GPP_S7_AID := 16777308;

 const octetstring c_def_sess_id := char2oct("ttcn3.session");
@@ -1215,142 +1214,6 @@
return diam_pdu;
 }

-/* RFC 4006 3.1.  Credit-Control-Request (CCR) Command */
-template (present) PDU_DIAMETER
-tr_DIA_Gx_CCR(template (present) DCC_NONE_CC_Request_Type req_type := 
INITIAL_REQUEST)
-:= tr_DIAMETER(flags:='1100'B, cmd_code:=Credit_Control,
-   avps := superset(
-   tr_AVP_SessionId,
-   tr_AVP_OriginHost,
-   tr_AVP_OriginRealm,
-   tr_AVP_DestinationRealm,
-   tr_AVP_AuthAppId(int2oct(c_DIAMETER_3GPP_Gx_AID, 4)),
-   tr_AVP_CcReqType(req_type),
-   tr_AVP_CcReqNum(?)
-   ));
-template (present) PDU_DIAMETER
-tr_DIA_Gy_CCR(template (present) DCC_NONE_CC_Request_Type req_type := 
INITIAL_REQUEST)
-:= tr_DIAMETER(flags:='1100'B, cmd_code:=Credit_Control,
-   avps := superset(
-   tr_AVP_SessionId,
-   tr_AVP_OriginHost,
-   tr_AVP_OriginRealm,
-   tr_AVP_DestinationRealm,
-   tr_AVP_AuthAppId(int2oct(c_DIAMETER_CREDIT_CONTROL_AID, 4)),
-   tr_AVP_CcReqType(req_type),
-   tr_AVP_CcReqNum(?)
-   ));
-
-
-
-/* RFC 4006 3.2.  Credit-Control-Answer (CCA) Command */
-template (value) PDU_DIAMETER
-ts_DIA_Gx_CCA(template (value) UINT32 hbh_id, template (value) UINT32 ete_id,
-  template (value) octetstring sess_id,
-  template (value) DCC_NONE_CC_Request_Type req_type,
-  template (value) AVP_Unsigned32 req_num)
-:= ts_DIAMETER(flags:='0100'B, cmd_code:=Credit_Control,
-   app_id:=int2oct(c_DIAMETER_3GPP_Gx_AID, 4), hbh_id:=hbh_id, 
ete_id:=ete_id,
-   avps := {
-   ts_AVP_SessionId(sess_id),
-   ts_AVP_ResultCode(DIAMETER_SUCCESS),
-   ts_AVP_OriginHost("pcrf.localdomain"),
-   ts_AVP_OriginRealm("localdomain"),
-   ts_AVP_AuthAppId(int2oct(c_DIAMETER_3GPP_Gx_AID, 4)),
-   ts_AVP_CcReqType(req_type),
-   

[M] Change in osmo-ttcn3-hacks[master]: GSUP: Fix build of IEs in f_gen_tr_ies(), add PdpInfo(Compl) IEs to it

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

Change subject: GSUP: Fix build of IEs in f_gen_tr_ies(), add PdpInfo(Compl) 
IEs to it
..

GSUP: Fix build of IEs in f_gen_tr_ies(), add PdpInfo(Compl) IEs to it

The previous conditions "isvalue()" were wrong. Passing an array of
templates to isvalue() returns false, which is unexpected here.

Change-Id: Iaad47b1ec7e2a7477fa554df9caeb866ffa594eb
---
M epdg/EPDG_Tests.ttcn
M library/GSUP_Templates.ttcn
2 files changed, 117 insertions(+), 13 deletions(-)

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




diff --git a/epdg/EPDG_Tests.ttcn b/epdg/EPDG_Tests.ttcn
index 554dd07..0e9cbed 100644
--- a/epdg/EPDG_Tests.ttcn
+++ b/epdg/EPDG_Tests.ttcn
@@ -506,8 +506,15 @@
GSUP.send(ts_GSUP_EPDGTunnel_REQ(g_pars.imsi));
f_GTP2C_CreateSession_success();
/* Expect a positive response back to the translator; */
+   var template (present) GSUP_IEs pdp_info := {
+   tr_GSUP_IE_PDP_CONTEXT_ID(?),
+   tr_GSUP_IE_PDP_ADDRESS(?),
+   tr_GSUP_IE_APN(?),
+   tr_GSUP_IE_PDP_QOS(?),
+   tr_GSUP_IE_Charging_Characteristics(?)
+   };
alt {
-   [] GSUP.receive(tr_GSUP_EPDGTunnel_RES(g_pars.imsi));
+   [] GSUP.receive(tr_GSUP_EPDGTunnel_RES(g_pars.imsi, pdp_info));
[] GSUP.receive(GSUP_PDU:?) -> value rx_gsup {
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, 
log2str("Unexpected GSUP msg rx: ", rx_gsup));
}
diff --git a/library/GSUP_Templates.ttcn b/library/GSUP_Templates.ttcn
index ea2b489..68e4fd1 100644
--- a/library/GSUP_Templates.ttcn
+++ b/library/GSUP_Templates.ttcn
@@ -190,6 +190,34 @@
}
}
 }
+template (value) GSUP_IE ts_GSUP_IE_PdpInfo_ie(template (value) GSUP_IEs 
pdp_info) := {
+   tag := OSMO_GSUP_PDP_INFO_IE,
+   len := 0, /* overwritten */
+   val := {
+   pdp_info := pdp_info
+   }
+}
+
+template (present) GSUP_IE tr_GSUP_IE_PdpInfo(template (present) OCT1 ctx_id,
+ template (present) octetstring 
apn,
+ template (present) 
GSUP_PDP_Address pdp_address) := {
+   tag := OSMO_GSUP_PDP_INFO_IE,
+   len := ?,
+   val := {
+   pdp_info := {
+   tr_GSUP_IE_PDP_CONTEXT_ID(ctx_id),
+   tr_GSUP_IE_PDP_ADDRESS(pdp_address),
+   tr_GSUP_IE_APN(apn)
+   }
+   }
+}
+template (present) GSUP_IE tr_GSUP_IE_PdpInfo_ie(template (present) GSUP_IEs 
pdp_info := ?) := {
+   tag := OSMO_GSUP_PDP_INFO_IE,
+   len := ?,
+   val := {
+   pdp_info := pdp_info
+   }
+}

 template (value) GSUP_IE ts_GSUP_IE_PDP_CONTEXT_ID(template (value) OCT1 
ctx_id) := {
tag := OSMO_GSUP_PDP_CONTEXT_ID_IE,
@@ -207,7 +235,6 @@
}
 }
 
-
 template (value) GSUP_IE ts_GSUP_IE_PDP_ADDRESS(template (value) 
GSUP_PDP_Address pdp_address) := {
tag := OSMO_GSUP_PDP_ADDRESS_IE,
len := 0,
@@ -216,6 +243,14 @@
}
 }

+template (present) GSUP_IE tr_GSUP_IE_PDP_ADDRESS(template (present) 
GSUP_PDP_Address pdp_address := ?) := {
+   tag := OSMO_GSUP_PDP_ADDRESS_IE,
+   len := ?,
+   val := {
+   pdp_address := pdp_address
+   }
+}
+
 template (value) GSUP_IE ts_GSUP_IE_PDP_QOS(template (value) octetstring 
pdp_qos) := {
tag := OSMO_GSUP_PDP_QOS_IE,
len := 0,
@@ -224,6 +259,29 @@
}
 }

+template (present) GSUP_IE tr_GSUP_IE_PDP_QOS(template (present) octetstring 
pdp_qos := ?) := {
+   tag := OSMO_GSUP_PDP_QOS_IE,
+   len := ?,
+   val := {
+   pdp_qos := pdp_qos
+   }
+}
+
+template (value) GSUP_IE ts_GSUP_IE_Charging_Characteristics(template (value) 
octetstring charg_char) := {
+   tag := OSMO_GSUP_CHARG_CHAR_IE,
+   len := 0,
+   val := {
+   charg_char := charg_char
+   }
+}
+
+template (present) GSUP_IE tr_GSUP_IE_Charging_Characteristics(template 
(present) octetstring charg_char := ?) := {
+   tag := OSMO_GSUP_CHARG_CHAR_IE,
+   len := ?,
+   val := {
+   charg_char := charg_char
+   }
+}

 template GSUP_PDU tr_GSUP(template GSUP_MessageType msgt := ?, template 
GSUP_IEs ies := *) := {
msg_type := msgt,
@@ -428,19 +486,25 @@
 

 template (value) GSUP_PDU ts_GSUP_EPDGTunnel_RES(hexstring imsi,
+   template (value) GSUP_IEs 
pdp_info,
GSUP_Message_Class 
message_class := OSMO_GSUP_MESSAGE_CLASS_IPSEC_EPDG,
octetstring 

[M] Change in osmo-ttcn3-hacks[master]: GSUP: Fix build of IEs in f_gen_tr_ies(), add PdpInfo(Compl) IEs to it

2024-01-24 Thread fixeria
Attention is currently required from: pespin.

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

Change subject: GSUP: Fix build of IEs in f_gen_tr_ies(), add PdpInfo(Compl) 
IEs to it
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35653?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: Iaad47b1ec7e2a7477fa554df9caeb866ffa594eb
Gerrit-Change-Number: 35653
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 24 Jan 2024 14:07:00 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-ttcn3-hacks[master]: GSUP: Fix missing and wrongly sorted IEs in ts_GSUP_IE_PdpInfo

2024-01-24 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35652?usp=email )

Change subject: GSUP: Fix missing and wrongly sorted IEs in ts_GSUP_IE_PdpInfo
..


Patch Set 2:

(1 comment)

Patchset:

PS2:
> I don't think so. Proof of it is that TTCN3, erlang and libosmocore all used 
> different orders. […]
Not sure about Erlang projects, but the current TTCN-3 implementation 
definitely requires specific ordering of TLVs; otherwise the templates won't 
match. We could change definition of `GSUP_IEs` as follows:

```
-type record of GSUP_IE GSUP_IEs;
+type set of GSUP_IE GSUP_IEs;
```

This would simplify things a bit.



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35652?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: I65e586187d7230f122644c101f8467becae6e204
Gerrit-Change-Number: 35652
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Wed, 24 Jan 2024 14:01:07 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[M] Change in osmocom-bb[master]: mobile: VTY: use 'enum gsm48_bcap_transp' from libosmogsm

2024-01-24 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/35661?usp=email )

Change subject: mobile: VTY: use 'enum gsm48_bcap_transp' from libosmogsm
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Iebc0692f17a5a5d04e57d74a720db52775937bdd
Gerrit-Change-Number: 35661
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Wed, 24 Jan 2024 13:55:43 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[L] Change in osmocom-bb[master]: mobile: VTY: rework data type/rate configuration commands

2024-01-24 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/35663?usp=email )

Change subject: mobile: VTY: rework data type/rate configuration commands
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I7393fce82613a57275033f5c47e16bbf708a3bfb
Gerrit-Change-Number: 35663
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Wed, 24 Jan 2024 13:55:34 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmocom-bb[master]: mobile: VTY: make soft-UART parameters configurable

2024-01-24 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/35662?usp=email )

Change subject: mobile: VTY: make soft-UART parameters configurable
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I48bb58aaf1101fbc0e58db3fb1100927e506ede2
Gerrit-Change-Number: 35662
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Wed, 24 Jan 2024 13:55:38 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-bts[master]: osmo-bts-trx: add test VTY command to send arbitrary TRXC messages

2024-01-24 Thread fixeria
fixeria has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/35654?usp=email )

Change subject: osmo-bts-trx: add test VTY command to send arbitrary TRXC 
messages
..

osmo-bts-trx: add test VTY command to send arbitrary TRXC messages

Change-Id: Iabc9b702e5f1513187e24f45d9ffe06ea940c3ec
---
M src/osmo-bts-trx/trx_if.c
M src/osmo-bts-trx/trx_if.h
M src/osmo-bts-trx/trx_vty.c
3 files changed, 50 insertions(+), 3 deletions(-)

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




diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c
index 89078a3..b6b20e9 100644
--- a/src/osmo-bts-trx/trx_if.c
+++ b/src/osmo-bts-trx/trx_if.c
@@ -227,8 +227,8 @@
  *  The new command will be added to the end of the control command
  *  queue.
  */
-static int trx_ctrl_cmd_cb(struct trx_l1h *l1h, int critical, void *cb, const 
char *cmd,
-   const char *fmt, ...)
+int trx_ctrl_cmd_cb(struct trx_l1h *l1h, int critical, void *cb,
+   const char *cmd, const char *fmt, ...)
 {
struct trx_ctrl_msg *tcm;
struct trx_ctrl_msg *prev = NULL;
@@ -277,7 +277,6 @@

return 0;
 }
-#define trx_ctrl_cmd(l1h, critical, cmd, fmt, ...) trx_ctrl_cmd_cb(l1h, 
critical, NULL, cmd, fmt, ##__VA_ARGS__)

 /*! Send "POWEROFF" command to TRX */
 int trx_if_cmd_poweroff(struct trx_l1h *l1h, trx_if_cmd_poweronoff_cb *cb)
diff --git a/src/osmo-bts-trx/trx_if.h b/src/osmo-bts-trx/trx_if.h
index b838b76..3a22a1b 100644
--- a/src/osmo-bts-trx/trx_if.h
+++ b/src/osmo-bts-trx/trx_if.h
@@ -48,3 +48,7 @@

 /* Format negotiation command */
 int trx_if_cmd_setformat(struct trx_l1h *l1h, uint8_t ver, 
trx_if_cmd_generic_cb *cb);
+
+int trx_ctrl_cmd_cb(struct trx_l1h *l1h, int critical, void *cb,
+   const char *cmd, const char *fmt, ...);
+#define trx_ctrl_cmd(l1h, critical, cmd, fmt, ...) trx_ctrl_cmd_cb(l1h, 
critical, NULL, cmd, fmt, ##__VA_ARGS__)
diff --git a/src/osmo-bts-trx/trx_vty.c b/src/osmo-bts-trx/trx_vty.c
index 998e9cb..9056f02 100644
--- a/src/osmo-bts-trx/trx_vty.c
+++ b/src/osmo-bts-trx/trx_vty.c
@@ -194,6 +194,39 @@
return CMD_SUCCESS;
 }

+DEFUN_HIDDEN(test_send_trxc,
+test_send_trxc_cmd,
+"test send-trxc-cmd <0-255> CMD [.ARGS]",
+"Various testing commands\n"
+"Send an arbitrary TRX command\n"
+"Transceiver number\n"
+"TRXC command\n" "TRXC command arguments\n")
+{
+   const struct gsm_bts_trx *trx;
+   const struct phy_instance *pinst;
+   struct trx_l1h *l1h;
+   int rc;
+
+   trx = gsm_bts_trx_num(g_bts, atoi(argv[0]));
+   if (trx == NULL) {
+   vty_out(vty, "%% Could not find TRX%s", VTY_NEWLINE);
+   return CMD_WARNING;
+   }
+
+   pinst = trx_phy_instance(trx);
+   l1h = pinst->u.osmotrx.hdl;
+
+   if (argc > 2) {
+   char *cmd_args = argv_concat(argv, argc, 2);
+   rc = trx_ctrl_cmd(l1h, 0, argv[1], "%s", cmd_args);
+   talloc_free(cmd_args);
+   } else {
+   rc = trx_ctrl_cmd(l1h, 0, argv[1], "");
+   }
+
+   return (rc == 0) ? CMD_SUCCESS : CMD_WARNING;
+}
+
 DEFUN_USRATTR(cfg_trx_nominal_power, cfg_trx_nominal_power_cmd,
  X(BTS_VTY_TRX_POWERCYCLE),
  "nominal-tx-power <-10-100>",
@@ -630,6 +663,8 @@
install_element_ve(_transceiver_cmd);
install_element_ve(_phy_cmd);

+   install_element(ENABLE_NODE, _send_trxc_cmd);
+
install_element(TRX_NODE, _trx_nominal_power_cmd);
install_element(TRX_NODE, _trx_no_nominal_power_cmd);


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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Iabc9b702e5f1513187e24f45d9ffe06ea940c3ec
Gerrit-Change-Number: 35654
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[S] Change in osmo-ci[master]: jobs/update-osmo-ci: remove build3

2024-01-24 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/35670?usp=email )

Change subject: jobs/update-osmo-ci: remove build3
..

jobs/update-osmo-ci: remove build3

Related: OS#6186
Change-Id: I63bbac0a767c30f8d3e4552024172bd689122d61
---
M jobs/update-osmo-ci-on-slaves.yml
1 file changed, 10 insertions(+), 1 deletion(-)

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




diff --git a/jobs/update-osmo-ci-on-slaves.yml 
b/jobs/update-osmo-ci-on-slaves.yml
index 2b1d81f..c826175 100644
--- a/jobs/update-osmo-ci-on-slaves.yml
+++ b/jobs/update-osmo-ci-on-slaves.yml
@@ -8,7 +8,6 @@
   values:
 - build2-deb10build-ansible
 - build2-deb11build-ansible
-- build3-deb11build-ansible
 - build4-deb12build-ansible
 - gtp0-deb10fr
 - host2-deb11build-ansible

--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35670?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: I63bbac0a767c30f8d3e4552024172bd689122d61
Gerrit-Change-Number: 35670
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-MessageType: merged


[S] Change in osmo-ci[master]: jobs/update-osmo-ci: remove build3

2024-01-24 Thread laforge
Attention is currently required from: osmith.

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

Change subject: jobs/update-osmo-ci: remove build3
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35670?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: I63bbac0a767c30f8d3e4552024172bd689122d61
Gerrit-Change-Number: 35670
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Wed, 24 Jan 2024 13:22:48 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libosmocore[master]: Add logging category for libosmo-cc

2024-01-24 Thread pespin
Attention is currently required from: jolly, laforge.

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

Change subject: Add logging category for libosmo-cc
..


Patch Set 2:

(1 comment)

File include/osmocom/core/logging.h:

https://gerrit.osmocom.org/c/libosmocore/+/35572/comment/31874ad6_11a066cc
PS2, Line 158: #defin
> this breaks ABI; it means we need to bump the LIBVERSION on next libosmocore 
> release and hence needs […]
That's why I proposed adding the category dynamically if it makes sense, 
because it avoids breaking the ABI.



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35572?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: I9df433b2cfb51f04dbf16e9f8dee567a59ab5cb7
Gerrit-Change-Number: 35572
Gerrit-PatchSet: 2
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: jolly 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Wed, 24 Jan 2024 12:36:10 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment


[S] Change in osmo-ttcn3-hacks[master]: GSUP: Fix missing and wrongly sorted IEs in ts_GSUP_IE_PdpInfo

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

Change subject: GSUP: Fix missing and wrongly sorted IEs in ts_GSUP_IE_PdpInfo
..

GSUP: Fix missing and wrongly sorted IEs in ts_GSUP_IE_PdpInfo

Sort them to follow libosmocore implementation.

Change-Id: I65e586187d7230f122644c101f8467becae6e204
---
M library/GSUP_Templates.ttcn
M sgsn/SGSN_Tests.ttcn
2 files changed, 20 insertions(+), 7 deletions(-)

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




diff --git a/library/GSUP_Templates.ttcn b/library/GSUP_Templates.ttcn
index 7146e97..ea2b489 100644
--- a/library/GSUP_Templates.ttcn
+++ b/library/GSUP_Templates.ttcn
@@ -175,21 +175,23 @@
}
 }

-template GSUP_IE ts_GSUP_IE_PdpInfo(template (value) octetstring apn,
-   template (value) GSUP_PDP_Address 
pdp_address,
-   template (value) octetstring pdp_qos) := {
+template (value) GSUP_IE ts_GSUP_IE_PdpInfo(template (value) OCT1 ctx_id,
+   template (value) octetstring apn,
+   template (value) GSUP_PDP_Address 
pdp_address,
+   template (value) octetstring 
pdp_qos) := {
tag := OSMO_GSUP_PDP_INFO_IE,
len := 0, /* overwritten */
val := {
pdp_info := {
-   valueof(ts_GSUP_IE_APN(apn)),
+   valueof(ts_GSUP_IE_PDP_CONTEXT_ID(ctx_id)),
valueof(ts_GSUP_IE_PDP_ADDRESS(pdp_address)),
+   valueof(ts_GSUP_IE_APN(apn)),
valueof(ts_GSUP_IE_PDP_QOS(pdp_qos))
}
}
 }

-template (value) GSUP_IE ts_GSUP_IE_PDP_CONTEXT_ID(OCT1 ctx_id) := {
+template (value) GSUP_IE ts_GSUP_IE_PDP_CONTEXT_ID(template (value) OCT1 
ctx_id) := {
tag := OSMO_GSUP_PDP_CONTEXT_ID_IE,
len := 0,
val := {
@@ -197,7 +199,7 @@
}
 }

-template GSUP_IE tr_GSUP_IE_PDP_CONTEXT_ID(template OCT1 ctx_id) := {
+template (present) GSUP_IE tr_GSUP_IE_PDP_CONTEXT_ID(template OCT1 ctx_id) := {
tag := OSMO_GSUP_PDP_CONTEXT_ID_IE,
len := ?,
val := {
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 1fd20a5..0824d6e 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -876,7 +876,7 @@
 private altstep as_gmm_gsup_lu_isd() runs on BSSGP_ConnHdlr {
[] GSUP.receive(tr_GSUP_UL_REQ(g_pars.imsi)) {
var GSUP_PDU gsup := valueof(ts_GSUP_ISD_REQ(g_pars.imsi, 
g_pars.msisdn));
-   gsup.ies := gsup.ies & { 
valueof(ts_GSUP_IE_PdpInfo(char2oct("*"), ts_EuaIPv4Dyn, ''O)) };
+   gsup.ies := gsup.ies & { valueof(ts_GSUP_IE_PdpInfo('00'O, 
char2oct("*"), ts_EuaIPv4Dyn, ''O)) };
GSUP.send(gsup);
GSUP.receive(tr_GSUP_ISD_RES(g_pars.imsi));
GSUP.send(ts_GSUP_UL_RES(g_pars.imsi));

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35652?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: I65e586187d7230f122644c101f8467becae6e204
Gerrit-Change-Number: 35652
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]: GSUP: Fix missing and wrongly sorted IEs in ts_GSUP_IE_PdpInfo

2024-01-24 Thread pespin
Attention is currently required from: laforge.

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

Change subject: GSUP: Fix missing and wrongly sorted IEs in ts_GSUP_IE_PdpInfo
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35652?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: I65e586187d7230f122644c101f8467becae6e204
Gerrit-Change-Number: 35652
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Wed, 24 Jan 2024 12:34:24 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-ttcn3-hacks[master]: GSUP: Fix missing and wrongly sorted IEs in ts_GSUP_IE_PdpInfo

2024-01-24 Thread pespin
Attention is currently required from: laforge.

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

Change subject: GSUP: Fix missing and wrongly sorted IEs in ts_GSUP_IE_PdpInfo
..


Patch Set 2:

(1 comment)

Patchset:

PS2:
> do we guarantee any specific order of IEs in the GSUP spec?
I don't think so. Proof of it is that TTCN3, erlang and libosmocore all used 
different orders. But I still think it makes sense to try to keep them similar.



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35652?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: I65e586187d7230f122644c101f8467becae6e204
Gerrit-Change-Number: 35652
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Wed, 24 Jan 2024 12:34:22 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment


[S] Change in osmo-ttcn3-hacks[master]: GSUP: Fix PDPInfoCompl IE

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

Change subject: GSUP: Fix PDPInfoCompl IE
..

GSUP: Fix PDPInfoCompl IE

Change-Id: I7b6e584f12828019fc9c0f961a0c8692c0b44b1c
---
M library/GSUP_Templates.ttcn
M library/GSUP_Types.ttcn
2 files changed, 28 insertions(+), 2 deletions(-)

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




diff --git a/library/GSUP_Templates.ttcn b/library/GSUP_Templates.ttcn
index 634cfc3..7146e97 100644
--- a/library/GSUP_Templates.ttcn
+++ b/library/GSUP_Templates.ttcn
@@ -159,6 +159,22 @@
}
 }

+template (value) GSUP_IE ts_GSUP_IE_PdpInfoCompl := {
+   tag := OSMO_GSUP_PDP_INFO_COMPL_IE,
+   len := 0, /* overwritten */
+   val := {
+   pdp_info_compl := ''O
+   }
+}
+
+template (present) GSUP_IE tr_GSUP_IE_PdpInfoCompl := {
+   tag := OSMO_GSUP_PDP_INFO_COMPL_IE,
+   len := 0, /* overwritten */
+   val := {
+   pdp_info_compl := ''O
+   }
+}
+
 template GSUP_IE ts_GSUP_IE_PdpInfo(template (value) octetstring apn,
template (value) GSUP_PDP_Address 
pdp_address,
template (value) octetstring pdp_qos) := {
diff --git a/library/GSUP_Types.ttcn b/library/GSUP_Types.ttcn
index 666d8d0..07356f7 100644
--- a/library/GSUP_Types.ttcn
+++ b/library/GSUP_Types.ttcn
@@ -244,6 +244,7 @@
 cause, tag = OSMO_GSUP_CAUSE_IE;
 cancel_type, tag = OSMO_GSUP_CANCEL_TYPE_IE;
 auth_tuple, tag = OSMO_GSUP_AUTH_TUPLE_IE;
+pdp_info_compl, tag = 
OSMO_GSUP_PDP_INFO_COMPL_IE;
 auts, tag = OSMO_GSUP_AUTS_IE;
 rand, tag = OSMO_GSUP_RAND_IE;
 sres, tag = OSMO_GSUP_SRES_IE;
@@ -301,8 +302,8 @@
hexstring   imsi,
integer cause,
GSUP_CancelType cancel_type,
-   //boolean   pdp_info_compl,
-   //boolean   freeze_ptmsi,
+   octetstring pdp_info_compl,
+   //octetstring   freeze_ptmsi,
GSUP_IEsauth_tuple,
octetstring auts,
octetstring rand,

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


[M] Change in osmo-ttcn3-hacks[master]: GSUP: Convert PDP-Type IE to PDP-Address IE

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

Change subject: GSUP: Convert PDP-Type IE to PDP-Address IE
..

GSUP: Convert PDP-Type IE to PDP-Address IE

The previous PDP-Type IE should have been a PDP-Address from the
start, since having only PDP-Type with no address is only a specific
case (dynamic addressing).
This becomes clear by looking at other similar protocols like:
* MAP: APN-Configuration IE has servedPartyIP-IP{v4,v6}-Address IEs
* Diameter S6b, 3GPP TS 29.272 7.3.35 APN-Configuration contains
  Served-Party-IP-Address AVPs
* Diameter SWx, 3GPP TS 29.273 APN-Configuration.
* GTPv1C Ts 29.060 7.7.29 PDP Context containing PDP Address.

Since PDP-Type on its own really makes no sense, being it a special case
of PDP-Address, let's keep the IE by renaming it (keeping old name too
for API backward compat) and extend it to support lengths > 2 bytes.

Old implementation of libosmogsm gsup actually ignored lengths > 2
bytes, so we are safe acting against older implementations here, both
on the sending and receiving side on the wire.

Change-Id: I3e92368fff61694bcef6a48320595b59ae8f54ca
Related: OS#6091
Related: libosmocore.git Change-Id I775ff9c3be165d9f30d6ab55d03f99b6104eadd6
Related: osmo-gsm-manuals.git Change-Id 
I775ff9c3be165d9f30d6ab55d03f99b6104eadd6
---
M library/GSUP_Templates.ttcn
M library/GSUP_Types.ttcn
M sgsn/SGSN_Tests.ttcn
3 files changed, 91 insertions(+), 12 deletions(-)

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




diff --git a/library/GSUP_Templates.ttcn b/library/GSUP_Templates.ttcn
index 0e9a2e5..634cfc3 100644
--- a/library/GSUP_Templates.ttcn
+++ b/library/GSUP_Templates.ttcn
@@ -59,7 +59,15 @@
digits := digits
 }

-
+template (value) GSUP_PDP_Address ts_GSUP_PDP_Address_IPv4(template (omit) 
OCT4 ip_addr) := {
+   ipv4 := {
+   pdp_typeorg := '0001'B,
+   spare := ''B,
+   pdp_typenum := '21'O,
+   ipv4_address := ip_addr
+   }
+}
+template (value) GSUP_PDP_Address ts_EuaIPv4Dyn := 
ts_GSUP_PDP_Address_IPv4(omit);

 template GSUP_IE ts_GSUP_IE_AuthTuple2G(octetstring rand, octetstring sres,
octetstring kc) := {
@@ -151,13 +159,15 @@
}
 }

-template GSUP_IE ts_GSUP_IE_PdpInfo(octetstring apn, octetstring pdp_type, 
octetstring pdp_qos) := {
+template GSUP_IE ts_GSUP_IE_PdpInfo(template (value) octetstring apn,
+   template (value) GSUP_PDP_Address 
pdp_address,
+   template (value) octetstring pdp_qos) := {
tag := OSMO_GSUP_PDP_INFO_IE,
len := 0, /* overwritten */
val := {
pdp_info := {
valueof(ts_GSUP_IE_APN(apn)),
-   valueof(ts_GSUP_IE_PDP_TYPE(pdp_type)),
+   valueof(ts_GSUP_IE_PDP_ADDRESS(pdp_address)),
valueof(ts_GSUP_IE_PDP_QOS(pdp_qos))
}
}
@@ -180,15 +190,15 @@
 }


-template (value) GSUP_IE ts_GSUP_IE_PDP_TYPE(OCT2 pdp_type) := {
-   tag := OSMO_GSUP_PDP_TYPE_IE,
+template (value) GSUP_IE ts_GSUP_IE_PDP_ADDRESS(template (value) 
GSUP_PDP_Address pdp_address) := {
+   tag := OSMO_GSUP_PDP_ADDRESS_IE,
len := 0,
val := {
-   pdp_type := pdp_type
+   pdp_address := pdp_address
}
 }

-template (value) GSUP_IE ts_GSUP_IE_PDP_QOS(octetstring pdp_qos) := {
+template (value) GSUP_IE ts_GSUP_IE_PDP_QOS(template (value) octetstring 
pdp_qos) := {
tag := OSMO_GSUP_PDP_QOS_IE,
len := 0,
val := {
@@ -633,7 +643,7 @@
}
 }

-template (value) GSUP_IE ts_GSUP_IE_APN(octetstring apn) := {
+template (value) GSUP_IE ts_GSUP_IE_APN(template (value) octetstring apn) := {
tag := OSMO_GSUP_ACCESS_POINT_NAME_IE,
len := 0, /* overwritten */
val := {
diff --git a/library/GSUP_Types.ttcn b/library/GSUP_Types.ttcn
index f9faeb7..666d8d0 100644
--- a/library/GSUP_Types.ttcn
+++ b/library/GSUP_Types.ttcn
@@ -29,7 +29,7 @@
OSMO_GSUP_MSISDN_IE ('08'O),
OSMO_GSUP_HLR_NUMBER_IE ('09'O),
OSMO_GSUP_PDP_CONTEXT_ID_IE ('10'O),
-   OSMO_GSUP_PDP_TYPE_IE   ('11'O),
+   OSMO_GSUP_PDP_ADDRESS_IE('11'O),
OSMO_GSUP_ACCESS_POINT_NAME_IE  ('12'O),
OSMO_GSUP_PDP_QOS_IE('13'O),
OSMO_GSUP_CHARG_CHAR_IE ('14'O),
@@ -196,6 +196,45 @@
octetstring pdu
 };

+type union GSUP_PDP_Address {
+   GSUP_PDP_Address_IPv4   ipv4,
+   GSUP_PDP_Address_IPv6   ipv6,
+   GSUP_PDP_Address_IPv4v6 ipv4v6,
+   GSUP_PDP_Address_unknownother
+} with { variant "TAG(ipv4, pdp_typenum = '21'O;
+ ipv6, 

[S] Change in ...osmo-epdg[master]: Forward IP Address from CreateSessionresponse in GSUP EPDG Tunnel Result

2024-01-24 Thread pespin
Attention is currently required from: laforge, lynxis lazus.

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

Change subject: Forward IP Address from CreateSessionresponse in GSUP EPDG 
Tunnel Result
..


Patch Set 2:

(1 comment)

File rebar.config:

https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35658/comment/3c5903c2_c4ee9419
PS2, Line 9:{osmo_gsup, {git, 
"https://gerrit.osmocom.org/erlang/osmo_gsup;, {branch, "osmocom/epdg"}}}
> It's actually needed because I pushed some commits there fixing the 
> PDP-Type->PDP-Address in osmo_gs […]
All that anyway is still temporary since all changes to gsup and CEAI 
interfaces are not yet merged into master since some stuff is not yet fully 
known how it will work.



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

Gerrit-Project: erlang/osmo-epdg
Gerrit-Branch: master
Gerrit-Change-Id: I2a9130d242830daa826414a287f54862752017d2
Gerrit-Change-Number: 35658
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Attention: laforge 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Wed, 24 Jan 2024 12:32:46 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[S] Change in ...osmo-epdg[master]: Forward IP Address from CreateSessionresponse in GSUP EPDG Tunnel Result

2024-01-24 Thread pespin
Attention is currently required from: laforge, lynxis lazus.

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

Change subject: Forward IP Address from CreateSessionresponse in GSUP EPDG 
Tunnel Result
..


Patch Set 2:

(1 comment)

File rebar.config:

https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35658/comment/e60bd57d_94746e26
PS2, Line 9:{osmo_gsup, {git, 
"https://gerrit.osmocom.org/erlang/osmo_gsup;, {branch, "osmocom/epdg"}}}
> probably an unrelated change to switch the repo to upstream?
It's actually needed because I pushed some commits there fixing the 
PDP-Type->PDP-Address in osmo_gsup erlang code.



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

Gerrit-Project: erlang/osmo-epdg
Gerrit-Branch: master
Gerrit-Change-Id: I2a9130d242830daa826414a287f54862752017d2
Gerrit-Change-Number: 35658
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Attention: laforge 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Wed, 24 Jan 2024 12:32:02 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment


[L] Change in osmocom-bb[master]: mobile: VTY: rework data type/rate configuration commands

2024-01-24 Thread pespin
Attention is currently required from: fixeria.

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

Change subject: mobile: VTY: rework data type/rate configuration commands
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I7393fce82613a57275033f5c47e16bbf708a3bfb
Gerrit-Change-Number: 35663
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Wed, 24 Jan 2024 12:31:10 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmocom-bb[master]: mobile: VTY: make soft-UART parameters configurable

2024-01-24 Thread pespin
Attention is currently required from: fixeria.

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

Change subject: mobile: VTY: make soft-UART parameters configurable
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I48bb58aaf1101fbc0e58db3fb1100927e506ede2
Gerrit-Change-Number: 35662
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Wed, 24 Jan 2024 12:30:19 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmocom-bb[master]: mobile: VTY: use 'enum gsm48_bcap_transp' from libosmogsm

2024-01-24 Thread pespin
Attention is currently required from: fixeria.

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

Change subject: mobile: VTY: use 'enum gsm48_bcap_transp' from libosmogsm
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Iebc0692f17a5a5d04e57d74a720db52775937bdd
Gerrit-Change-Number: 35661
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Wed, 24 Jan 2024 12:29:26 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-ci[master]: jobs/update-osmo-ci: remove build3

2024-01-24 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/35670?usp=email )


Change subject: jobs/update-osmo-ci: remove build3
..

jobs/update-osmo-ci: remove build3

Related: OS#6186
Change-Id: I63bbac0a767c30f8d3e4552024172bd689122d61
---
M jobs/update-osmo-ci-on-slaves.yml
1 file changed, 10 insertions(+), 1 deletion(-)



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

diff --git a/jobs/update-osmo-ci-on-slaves.yml 
b/jobs/update-osmo-ci-on-slaves.yml
index 2b1d81f..c826175 100644
--- a/jobs/update-osmo-ci-on-slaves.yml
+++ b/jobs/update-osmo-ci-on-slaves.yml
@@ -8,7 +8,6 @@
   values:
 - build2-deb10build-ansible
 - build2-deb11build-ansible
-- build3-deb11build-ansible
 - build4-deb12build-ansible
 - gtp0-deb10fr
 - host2-deb11build-ansible

--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35670?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: I63bbac0a767c30f8d3e4552024172bd689122d61
Gerrit-Change-Number: 35670
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


[S] Change in osmo-ci[master]: jobs/ttcn3: remove 2023q1 testsuites

2024-01-24 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/35669?usp=email )

Change subject: jobs/ttcn3: remove 2023q1 testsuites
..

jobs/ttcn3: remove 2023q1 testsuites

Related: SYS#6759
Change-Id: I97fd1b98b1515c320a297aac429007cc500e7e29
---
M jobs/ttcn3-testsuites.yml
1 file changed, 10 insertions(+), 16 deletions(-)

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




diff --git a/jobs/ttcn3-testsuites.yml b/jobs/ttcn3-testsuites.yml
index 4eccfce..ce18cfb 100644
--- a/jobs/ttcn3-testsuites.yml
+++ b/jobs/ttcn3-testsuites.yml
@@ -272,22 +272,6 @@
   - TTCN3-centos-cbc-test-latest:
   timer: H 13 * * *

-  # centos8 2023q1 (SYS#6283)
-  - TTCN3-centos-pcu-test-2023q1:
-  timer: H 13 * * *
-  - TTCN3-centos-pcu-test-sns-2023q1:
-  timer: H 13 * * *
-  - TTCN3-centos-bsc-test-2023q1:
-  timer: H 14 * * *
-  - TTCN3-centos-mgw-test-2023q1:
-  timer: H 14 * * *
-  - TTCN3-centos-bts-test-2023q1:
-  timer: H 14 * * *
-  - TTCN3-centos-smlc-test-2023q1:
-  timer: H 14 * * *
-  - TTCN3-centos-gbproxy-test-2023q1:
-  timer: H 14 * * *
-
 - job-template:
 name: '{job-name}'
 project-type: freestyle

--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35669?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: I97fd1b98b1515c320a297aac429007cc500e7e29
Gerrit-Change-Number: 35669
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


[S] Change in osmo-ci[master]: jobs/ttcn3: remove 2023q1 testsuites

2024-01-24 Thread laforge
Attention is currently required from: osmith.

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

Change subject: jobs/ttcn3: remove 2023q1 testsuites
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35669?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: I97fd1b98b1515c320a297aac429007cc500e7e29
Gerrit-Change-Number: 35669
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Wed, 24 Jan 2024 09:12:56 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-ci[master]: jobs/ttcn3: remove 2023q1 testsuites

2024-01-24 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/35669?usp=email )


Change subject: jobs/ttcn3: remove 2023q1 testsuites
..

jobs/ttcn3: remove 2023q1 testsuites

Related: SYS#6759
Change-Id: I97fd1b98b1515c320a297aac429007cc500e7e29
---
M jobs/ttcn3-testsuites.yml
1 file changed, 10 insertions(+), 16 deletions(-)



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

diff --git a/jobs/ttcn3-testsuites.yml b/jobs/ttcn3-testsuites.yml
index 4eccfce..ce18cfb 100644
--- a/jobs/ttcn3-testsuites.yml
+++ b/jobs/ttcn3-testsuites.yml
@@ -272,22 +272,6 @@
   - TTCN3-centos-cbc-test-latest:
   timer: H 13 * * *

-  # centos8 2023q1 (SYS#6283)
-  - TTCN3-centos-pcu-test-2023q1:
-  timer: H 13 * * *
-  - TTCN3-centos-pcu-test-sns-2023q1:
-  timer: H 13 * * *
-  - TTCN3-centos-bsc-test-2023q1:
-  timer: H 14 * * *
-  - TTCN3-centos-mgw-test-2023q1:
-  timer: H 14 * * *
-  - TTCN3-centos-bts-test-2023q1:
-  timer: H 14 * * *
-  - TTCN3-centos-smlc-test-2023q1:
-  timer: H 14 * * *
-  - TTCN3-centos-gbproxy-test-2023q1:
-  timer: H 14 * * *
-
 - job-template:
 name: '{job-name}'
 project-type: freestyle

--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35669?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: I97fd1b98b1515c320a297aac429007cc500e7e29
Gerrit-Change-Number: 35669
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


[M] Change in libosmo-abis[master]: Add support for sending and receiving Sa bits, as well as some line s...

2024-01-24 Thread laforge
Attention is currently required from: dexter, jolly, tnt.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-abis/+/35563?usp=email )

Change subject: Add support for sending and receiving Sa bits, as well as some 
line signals
..


Patch Set 4:

(1 comment)

File src/e1_input.c:

https://gerrit.osmocom.org/c/libosmo-abis/+/35563/comment/4222f6f5_21c5953e
PS4, Line 1124: { S_L_INP_LINE_LOF, "LINE-LOF" },
  : { S_L_INP_LINE_NOLOF,   "LINE-NOLOF" },
> Done
but please send patches for user applications that treat this new LOF similar 
to how they treat LOS.  As far as I can tell, this would affect libosmo-abis 
and osmo-v5.



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

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Ie7643693c2daac99f5747591decd60e982b8052a
Gerrit-Change-Number: 35563
Gerrit-PatchSet: 4
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-CC: dexter 
Gerrit-Attention: jolly 
Gerrit-Attention: tnt 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Wed, 24 Jan 2024 08:55:55 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: jolly 
Comment-In-Reply-To: laforge 
Comment-In-Reply-To: tnt 
Gerrit-MessageType: comment


[M] Change in libosmo-abis[master]: Add support for sending and receiving Sa bits, as well as some line s...

2024-01-24 Thread laforge
Attention is currently required from: dexter, jolly, tnt.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-abis/+/35563?usp=email )

Change subject: Add support for sending and receiving Sa bits, as well as some 
line signals
..


Patch Set 4: Code-Review+1

(1 comment)

File src/e1_input.c:

https://gerrit.osmocom.org/c/libosmo-abis/+/35563/comment/e92bf69b_e4286c6d
PS4, Line 1124: { S_L_INP_LINE_LOF, "LINE-LOF" },
  : { S_L_INP_LINE_NOLOF,   "LINE-NOLOF" },
> I already had the loss-of-frame event in a previous patchset of osmo-e1d. as 
> @tnt@246tNt. […]
Done



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

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Ie7643693c2daac99f5747591decd60e982b8052a
Gerrit-Change-Number: 35563
Gerrit-PatchSet: 4
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-CC: dexter 
Gerrit-Attention: jolly 
Gerrit-Attention: tnt 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Wed, 24 Jan 2024 08:53:30 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: jolly 
Comment-In-Reply-To: laforge 
Comment-In-Reply-To: tnt 
Gerrit-MessageType: comment


[S] Change in osmo-bsc[master]: Also track downtime when OML link is lost

2024-01-24 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/35566?usp=email )

Change subject: Also track downtime when OML link is lost
..

Also track downtime when OML link is lost

This will be used in a later patch to dertemine when a BTS became
offline.

Related: OS#6018
Change-Id: I1776099cbfef51af1d5a3a056fb0654abd7366a9
---
M include/osmocom/bsc/bts.h
M src/osmo-bsc/bts.c
M src/osmo-bsc/bts_ctrl.c
M src/osmo-bsc/bts_ipaccess_nanobts.c
M src/osmo-bsc/bts_vty.c
M src/osmo-bsc/e1_config.c
6 files changed, 30 insertions(+), 13 deletions(-)

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




diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index a1799eb..e9634ee 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -375,8 +375,8 @@
struct e1inp_sign_link *oml_link;
/* Timer to use for deferred drop of OML link, see \ref 
ipaccess_drop_oml_deferred */
struct osmo_timer_list oml_drop_link_timer;
-   /* when OML link was established */
-   time_t uptime;
+   /* when OML link was established or lost */
+   time_t updowntime;
 
/* Abis network management O handle */
struct abis_nm_h *nmh;
@@ -815,7 +815,7 @@
 #define BTS_STORE_UPTIME_INTERVAL 10 /* in seconds */
 void bts_store_uptime(struct gsm_bts *bts);

-unsigned long long bts_uptime(const struct gsm_bts *bts);
+unsigned long long bts_updowntime(const struct gsm_bts *bts);

 #define BTS_STORE_LCHAN_DURATIONS_INTERVAL 1 /* in seconds */
 void bts_store_lchan_durations(struct gsm_bts *bts);
diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c
index 733d16e..8cc9e9a 100644
--- a/src/osmo-bsc/bts.c
+++ b/src/osmo-bsc/bts.c
@@ -766,7 +766,8 @@

 void bts_store_uptime(struct gsm_bts *bts)
 {
-   osmo_stat_item_set(osmo_stat_item_group_get_item(bts->bts_statg, 
BTS_STAT_UPTIME_SECONDS), bts_uptime(bts));
+   osmo_stat_item_set(osmo_stat_item_group_get_item(bts->bts_statg, 
BTS_STAT_UPTIME_SECONDS),
+  bts->oml_link ? bts_updowntime(bts) : 0);
 }

 void bts_store_lchan_durations(struct gsm_bts *bts)
@@ -824,20 +825,20 @@
rate_ctr_add(rate_ctr_group_get_ctr(bts->bts_ctrs, 
BTS_CTR_CHAN_SDCCH_ACTIVE_MILLISECONDS_TOTAL), elapsed_sdcch_ms);
 }

-unsigned long long bts_uptime(const struct gsm_bts *bts)
+unsigned long long bts_updowntime(const struct gsm_bts *bts)
 {
struct timespec tp;

-   if (!bts->uptime || !bts->oml_link)
+   if (!bts->updowntime)
return 0;

if (osmo_clock_gettime(CLOCK_MONOTONIC, ) != 0) {
-   LOGP(DNM, LOGL_ERROR, "BTS %u uptime computation failure: 
%s\n", bts->nr, strerror(errno));
+   LOGP(DNM, LOGL_ERROR, "BTS %u uptime/downtime computation 
failure: %s\n", bts->nr, strerror(errno));
return 0;
}

/* monotonic clock helps to ensure that the conversion is valid */
-   return difftime(tp.tv_sec, bts->uptime);
+   return difftime(tp.tv_sec, bts->updowntime);
 }

 char *get_model_oml_status(const struct gsm_bts *bts)
diff --git a/src/osmo-bsc/bts_ctrl.c b/src/osmo-bsc/bts_ctrl.c
index acbe68a..9c14190 100644
--- a/src/osmo-bsc/bts_ctrl.c
+++ b/src/osmo-bsc/bts_ctrl.c
@@ -372,7 +372,7 @@
 {
const struct gsm_bts *bts = cmd->node;

-   cmd->reply = talloc_asprintf(cmd, "%llu", bts_uptime(bts));
+   cmd->reply = talloc_asprintf(cmd, "%llu", bts->oml_link ? 
bts_updowntime(bts) : 0);
if (!cmd->reply) {
cmd->reply = "OOM";
return CTRL_CMD_ERROR;
diff --git a/src/osmo-bsc/bts_ipaccess_nanobts.c 
b/src/osmo-bsc/bts_ipaccess_nanobts.c
index c690b46..b0532e5 100644
--- a/src/osmo-bsc/bts_ipaccess_nanobts.c
+++ b/src/osmo-bsc/bts_ipaccess_nanobts.c
@@ -527,6 +527,8 @@
struct gsm_bts_trx_ts *ts ;
uint8_t tn;
uint8_t i;
+   struct timespec tp;
+   int rc;

/* First of all, remove deferred drop if enabled */
osmo_timer_del(>oml_drop_link_timer);
@@ -537,7 +539,8 @@
LOG_BTS(bts, DLINP, LOGL_NOTICE, "Dropping OML link: %s\n", reason);
e1inp_sign_link_destroy(bts->oml_link);
bts->oml_link = NULL;
-   bts->uptime = 0;
+   rc = osmo_clock_gettime(CLOCK_MONOTONIC, );
+   bts->updowntime = (rc < 0) ? 0 : tp.tv_sec; /* we don't need sub-second 
precision for downtime */
osmo_stat_item_dec(osmo_stat_item_group_get_item(bts->bts_statg, 
BTS_STAT_OML_CONNECTED), 1);
gsm_bts_stats_reset(bts);

@@ -710,7 +713,7 @@
E1INP_SIGN_OML, bts->c0,
bts->oml_tei, 0);
rc = osmo_clock_gettime(CLOCK_MONOTONIC, );
-   bts->uptime = (rc < 0) ? 0 : tp.tv_sec; /* we don't need 
sub-second precision for uptime 

[M] Change in osmo-bsc[master]: Add vty commands "no gprs nsvc ..."

2024-01-24 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/35571?usp=email )

Change subject: Add vty commands "no gprs nsvc ..."
..

Add vty commands "no gprs nsvc ..."

A switch (bool) is used to enable or disable NSVC 0 or 1. It is enabled
via any "gprs nsvc 0|1" command and disabled via "no gprs nsvc 0|1"
command. If it is disabled, it is treated as unconfigured, similar when
no remote IP or port has been defined.

Related: OS#6006
Change-Id: Ia112e86aa35f6a245d98ef1b3720c18835faeda6
---
M include/osmocom/bsc/bts_sm.h
M src/osmo-bsc/bts_vty.c
M src/osmo-bsc/nm_gprs_nsvc_fsm.c
M tests/gprs_params.vty
4 files changed, 51 insertions(+), 7 deletions(-)

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




diff --git a/include/osmocom/bsc/bts_sm.h b/include/osmocom/bsc/bts_sm.h
index e25b8da..13be3d9 100644
--- a/include/osmocom/bsc/bts_sm.h
+++ b/include/osmocom/bsc/bts_sm.h
@@ -40,6 +40,7 @@
/* data read via VTY config file, to configure the BTS
 * via OML from BSC */
int id;
+   bool enabled;
uint16_t nsvci;
uint16_t local_port;/* on the BTS */
struct osmo_sockaddr remote;
diff --git a/src/osmo-bsc/bts_vty.c b/src/osmo-bsc/bts_vty.c
index e38ec94..24224f6 100644
--- a/src/osmo-bsc/bts_vty.c
+++ b/src/osmo-bsc/bts_vty.c
@@ -1564,6 +1564,22 @@
 #define NSVC_TEXT "Network Service Virtual Connection (NS-VC)\n" \
"NSVC Logical Number\n"

+DEFUN_USRATTR(cfg_no_bts_gprs_nsvc,
+ cfg_no_bts_gprs_nsvc_cmd,
+ X(BSC_VTY_ATTR_RESTART_ABIS_OML_LINK),
+ "no gprs nsvc <0-1>",
+ NO_STR GPRS_TEXT NSVC_TEXT)
+{
+   struct gsm_bts *bts = vty->index;
+   int idx = atoi(argv[0]);
+
+   GPRS_CHECK_ENABLED(bts);
+
+   bts->site_mgr->gprs.nsvc[idx].enabled = false;
+
+   return CMD_SUCCESS;
+}
+
 DEFUN_USRATTR(cfg_bts_gprs_nsvci,
  cfg_bts_gprs_nsvci_cmd,
  X(BSC_VTY_ATTR_RESTART_ABIS_OML_LINK),
@@ -1578,6 +1594,7 @@
GPRS_CHECK_ENABLED(bts);

bts->site_mgr->gprs.nsvc[idx].nsvci = atoi(argv[1]);
+   bts->site_mgr->gprs.nsvc[idx].enabled = true;

return CMD_SUCCESS;
 }
@@ -1598,6 +1615,7 @@
GPRS_CHECK_ENABLED(bts);

bts->site_mgr->gprs.nsvc[idx].local_port = atoi(argv[1]);
+   bts->site_mgr->gprs.nsvc[idx].enabled = true;

return CMD_SUCCESS;
 }
@@ -1619,6 +1637,7 @@

/* sockaddr_in and sockaddr_in6 have the port at the same position */
bts->site_mgr->gprs.nsvc[idx].remote.u.sin.sin_port = 
htons(atoi(argv[1]));
+   bts->site_mgr->gprs.nsvc[idx].enabled = true;

return CMD_SUCCESS;
 }
@@ -1651,9 +1670,11 @@
switch (remote.af) {
case AF_INET:
osmo_sockaddr_str_to_in_addr(, 
>site_mgr->gprs.nsvc[idx].remote.u.sin.sin_addr);
+   bts->site_mgr->gprs.nsvc[idx].enabled = true;
break;
case AF_INET6:
osmo_sockaddr_str_to_in6_addr(, 
>site_mgr->gprs.nsvc[idx].remote.u.sin6.sin6_addr);
+   bts->site_mgr->gprs.nsvc[idx].enabled = true;
break;
}

@@ -4251,6 +4272,11 @@
const struct gsm_gprs_nsvc *nsvc = _sm->gprs.nsvc[i];
struct osmo_sockaddr_str remote;

+   if (!nsvc->enabled) {
+   vty_out(vty, "  no gprs nsvc %u%s", i, VTY_NEWLINE);
+   continue;
+   }
+
vty_out(vty, "  gprs nsvc %u nsvci %u%s", i,
nsvc->nsvci, VTY_NEWLINE);

@@ -4951,6 +4977,7 @@
install_element(BTS_NODE, _bts_gprs_bvci_cmd);
install_element(BTS_NODE, _bts_gprs_cell_timer_cmd);
install_element(BTS_NODE, _bts_gprs_nsei_cmd);
+   install_element(BTS_NODE, _no_bts_gprs_nsvc_cmd);
install_element(BTS_NODE, _bts_gprs_nsvci_cmd);
install_element(BTS_NODE, _bts_gprs_nsvc_lport_cmd);
install_element(BTS_NODE, _bts_gprs_nsvc_rport_cmd);
diff --git a/src/osmo-bsc/nm_gprs_nsvc_fsm.c b/src/osmo-bsc/nm_gprs_nsvc_fsm.c
index a3555aa..beedcdd 100644
--- a/src/osmo-bsc/nm_gprs_nsvc_fsm.c
+++ b/src/osmo-bsc/nm_gprs_nsvc_fsm.c
@@ -96,6 +96,10 @@

 static bool has_valid_nsvc(const struct gsm_gprs_nsvc *nsvc)
 {
+   /* If not configured (enabled) at all. */
+   if (!nsvc->enabled)
+   return false;
+
/* remote address must be valid */
if (osmo_sockaddr_is_any(>remote))
return false;
diff --git a/tests/gprs_params.vty b/tests/gprs_params.vty
index e0c8b39..0f69a8c 100644
--- a/tests/gprs_params.vty
+++ b/tests/gprs_params.vty
@@ -41,10 +41,8 @@
   gprs ns timer tns-test 30
   gprs ns timer tns-alive 3
   gprs ns timer tns-alive-retries 10
-  gprs nsvc 0 nsvci 0
-  gprs nsvc 0 local udp port 0
-  gprs nsvc 1 nsvci 0
-  gprs 

[M] Change in osmo-bsc[master]: VTY: Add command `show bts brief`

2024-01-24 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/35567?usp=email )

Change subject: VTY: Add command `show bts brief`
..

VTY: Add command `show bts brief`

This line shows all BTS an their OML states in a single line.
Additionally the uptime or downtime is displayed, if there was a connect
or disconnect of the OML link.

Related: OS#6018
Change-Id: I003fd32e589ddf53b7dd42089f904cfb598e3625
---
M include/osmocom/bsc/vty.h
M src/osmo-bsc/bsc_vty.c
M src/osmo-bsc/bts_vty.c
3 files changed, 47 insertions(+), 9 deletions(-)

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




diff --git a/include/osmocom/bsc/vty.h b/include/osmocom/bsc/vty.h
index a54b18e..092bc20 100644
--- a/include/osmocom/bsc/vty.h
+++ b/include/osmocom/bsc/vty.h
@@ -51,6 +51,7 @@

 int bts_vty_init(void);
 void bts_dump_vty(struct vty *vty, struct gsm_bts *bts);
+void bts_dump_vty_oml_link_state(struct vty *vty, struct gsm_bts *bts);
 void trx_dump_vty(struct vty *vty, struct gsm_bts_trx *trx, bool print_rsl, 
bool show_connected);
 void ts_dump_vty(struct vty *vty, struct gsm_bts_trx_ts *ts);
 void lchan_dump_full_vty(struct vty *vty, struct gsm_lchan *lchan);
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index 8a0747c..8690a47 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -257,6 +257,22 @@
return CMD_SUCCESS;
 }

+DEFUN(show_bts_brief, show_bts_brief_cmd, "show bts brief",
+   SHOW_STR "Display information about a BTS\n"
+   "Display availability status of all BTS\n")
+{
+   struct gsm_network *net = gsmnet_from_vty(vty);
+   struct gsm_bts *bts;
+
+   /* Print OML state of BTSs. */
+   llist_for_each_entry(bts, >bts_list, list) {
+   vty_out(vty, "BTS %d:", bts->nr);
+   bts_dump_vty_oml_link_state(vty, bts);
+   }
+
+   return CMD_SUCCESS;
+}
+
 DEFUN(show_bts_fail_rep, show_bts_fail_rep_cmd, "show bts <0-255> fail-rep 
[reset]",
SHOW_STR "Display information about a BTS\n"
"BTS number\n" "OML failure reports\n"
@@ -3634,6 +3650,7 @@

install_element_ve(_show_net_cmd);
install_element_ve(_bts_cmd);
+   install_element_ve(_bts_brief_cmd);
install_element_ve(_bts_fail_rep_cmd);
install_element_ve(_rejected_bts_cmd);
install_element_ve(_trx_cmd);
diff --git a/src/osmo-bsc/bts_vty.c b/src/osmo-bsc/bts_vty.c
index 8aa1f89..e38ec94 100644
--- a/src/osmo-bsc/bts_vty.c
+++ b/src/osmo-bsc/bts_vty.c
@@ -3992,7 +3992,6 @@
 void bts_dump_vty(struct vty *vty, struct gsm_bts *bts)
 {
struct pchan_load pl;
-   unsigned long long sec;
struct gsm_bts_trx *trx;
int ts_hopping_total;
int ts_non_hopping_total;
@@ -4124,14 +4123,7 @@
if (is_ipa_abisip_bts(bts)) {
vty_out(vty, "  OML Link: ");
e1isl_dump_vty_tcp(vty, bts->oml_link);
-   vty_out(vty, "  OML Link state: %s", get_model_oml_status(bts));
-   if (bts_setup_ramp_active(bts->network))
-   vty_out(vty, "  BTS Ramping: %s", 
bts_setup_ramp_get_state_str(bts));
-   sec = bts_updowntime(bts);
-   if (sec)
-   vty_out(vty, " %llu days %llu hours %llu min. %llu 
sec.",
-   OSMO_SEC2DAY(sec), OSMO_SEC2HRS(sec), 
OSMO_SEC2MIN(sec), sec % 60);
-   vty_out(vty, "%s", VTY_NEWLINE);
+   bts_dump_vty_oml_link_state(vty, bts);
} else {
vty_out(vty, "  E1 Signalling Link:%s", VTY_NEWLINE);
e1isl_dump_vty(vty, bts->oml_link);
@@ -4209,6 +4201,20 @@
bts_dump_vty_features(vty, bts);
 }

+void bts_dump_vty_oml_link_state(struct vty *vty, struct gsm_bts *bts)
+{
+   unsigned long long sec;
+
+   vty_out(vty, "  OML Link state: %s", get_model_oml_status(bts));
+   if (bts_setup_ramp_active(bts->network))
+   vty_out(vty, "  BTS Ramping: %s", 
bts_setup_ramp_get_state_str(bts));
+   sec = bts_updowntime(bts);
+   if (sec)
+   vty_out(vty, " %llu days %llu hours %llu min. %llu sec.",
+   OSMO_SEC2DAY(sec), OSMO_SEC2HRS(sec), 
OSMO_SEC2MIN(sec), sec % 60);
+   vty_out(vty, "%s", VTY_NEWLINE);
+}
+
 static void config_write_bts_gprs(struct vty *vty, struct gsm_bts *bts)
 {
unsigned int i;

--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/35567?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: I003fd32e589ddf53b7dd42089f904cfb598e3625
Gerrit-Change-Number: 35567
Gerrit-PatchSet: 4
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis 

[S] Change in libosmocore[master]: Add logging category for libosmo-cc

2024-01-24 Thread laforge
Attention is currently required from: jolly.

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

Change subject: Add logging category for libosmo-cc
..


Patch Set 2:

(1 comment)

File include/osmocom/core/logging.h:

https://gerrit.osmocom.org/c/libosmocore/+/35572/comment/11c7a53e_fcd03660
PS2, Line 158: #defin
this breaks ABI; it means we need to bump the LIBVERSION on next libosmocore 
release and hence needs a TODO-RELEASE.



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35572?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: I9df433b2cfb51f04dbf16e9f8dee567a59ab5cb7
Gerrit-Change-Number: 35572
Gerrit-PatchSet: 2
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Wed, 24 Jan 2024 08:52:18 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in osmo-msc[master]: Add LLC and HLC information to MNCC interface definiton

2024-01-24 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/35392?usp=email )

Change subject: Add LLC and HLC information to MNCC interface definiton
..

Add LLC and HLC information to MNCC interface definiton

low/high layer compatibility are used for capability checking between
caller and called entitiy.

The information is added to the end of struct gsm_mncc increases, so
that the version number needs not to be incremented.

Related: OS#6152
Change-Id: I15f5afcf069ee6c1c4641108ceacc837bee311b5
---
M include/osmocom/msc/mncc.h
M tests/mncc/mncc_test.ok
2 files changed, 38 insertions(+), 3 deletions(-)

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




diff --git a/include/osmocom/msc/mncc.h b/include/osmocom/msc/mncc.h
index c8f3bfd..d258630 100644
--- a/include/osmocom/msc/mncc.h
+++ b/include/osmocom/msc/mncc.h
@@ -125,9 +125,14 @@
 #define MNCC_F_KEYPAD  0x1000
 #define MNCC_F_SIGNAL  0x2000
 #define MNCC_F_GCR 0x4000
+#define MNCC_F_HIGHL_COMPAT0x8000
+#define MNCC_F_LOWL_COMPAT 0x1

 /* UPDATEME when adding new MNCC_F_* entries above */
-#define MNCC_F_ALL 0x7fff
+#define MNCC_F_ALL 0x1
+
+#define GSM_MAX_LOWL_COMPAT16 /* (18 with TLV) */
+#define GSM_MAX_HIGHL_COMPAT   3 /* (5 with TLV) */
 
 struct gsm_mncc {
/* context based information */
@@ -170,6 +175,20 @@

/* A buffer to contain SDP ('\0' terminated) */
charsdp[1024];
+
+   /* Additional information that extends current socket interface 
version. */
+
+   /* The content requals of Low Layer compatibility IE, described in 3GPP 
TS 24.008 §10.5.4.18. */
+   struct gsm_mncc_lowl_compat {
+   uint8_t len;
+   uint8_t compat[GSM_MAX_LOWL_COMPAT];
+   } llc;
+
+   /* The content requals of High Layer compatibility IE, described in 
3GPP TS 24.008 §10.5.4.16. */
+   struct gsm_mncc_highl_compat {
+   uint8_t len;
+   uint8_t compat[GSM_MAX_HIGHL_COMPAT];
+   } hlc;
 };

 struct gsm_data_frame {
diff --git a/tests/mncc/mncc_test.ok b/tests/mncc/mncc_test.ok
index 059e808..ca3ac64 100644
--- a/tests/mncc/mncc_test.ok
+++ b/tests/mncc/mncc_test.ok
@@ -1,10 +1,10 @@
 test_sdp_termination()

 struct gsm_mncc:
-empty SDP: len=1876 sdplen=1026 sdp="\0" rc=0
+empty SDP: len=1896 sdplen=1046 sdp="\0" rc=0
 empty SDP, shortest possible: len=851 sdplen=1 sdp="\0" rc=0
 empty SDP, zero len: len=850 sdplen=0 sdp=- rc=-22
-terminated SDP str: len=1876 sdplen=1026 sdp="Privacy is a desirable marketing 
option\0" rc=0
+terminated SDP str: len=1896 sdplen=1046 sdp="Privacy is a desirable marketing 
option\0" rc=0
 terminated SDP str, shortest possible: len=890 sdplen=40 sdp="Privacy is a 
desirable marketing option\0" rc=0
 terminated SDP str, but len excludes nul: len=889 sdplen=39 sdp="Privacy is a 
desirable marketing option" rc=-22
 terminated SDP str, but len too short: len=873 sdplen=23 sdp="Privacy is a 
desirable " rc=-22

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I15f5afcf069ee6c1c4641108ceacc837bee311b5
Gerrit-Change-Number: 35392
Gerrit-PatchSet: 6
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-CC: neels 
Gerrit-MessageType: merged


[S] Change in osmo-msc[master]: ASCI: Remove debug line, used during development process

2024-01-24 Thread laforge
Attention is currently required from: jolly.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/35545?usp=email )

Change subject: ASCI: Remove debug line, used during development process
..


Patch Set 4: Code-Review+2


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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ie297353146cf30360a7030a2d5ee03e3391cce64
Gerrit-Change-Number: 35545
Gerrit-PatchSet: 4
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Wed, 24 Jan 2024 08:50:09 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-msc[master]: Add LLC and HLC information forwarding to MNCC interface

2024-01-24 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/35393?usp=email )

Change subject: Add LLC and HLC information forwarding to MNCC interface
..

Add LLC and HLC information forwarding to MNCC interface

low/high layer compatibility are used for capability checking between
caller and called entitiy. The transcoding is performed by libosmogsm.

Related: OS#6152
Depends: libosmocore.git Ia6a2159ecf810a02f85b558026edf20b934567de
Change-Id: I760980a7e17e2fa81615adc69ef85797eb0c07f1
---
M src/libmsc/gsm_04_08_cc.c
1 file changed, 34 insertions(+), 0 deletions(-)

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




diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c
index f6ec81b..63b1699 100644
--- a/src/libmsc/gsm_04_08_cc.c
+++ b/src/libmsc/gsm_04_08_cc.c
@@ -654,6 +654,20 @@
gsm48_decode_called(,
  TLVP_VAL(, GSM48_IE_CALLED_BCD)-1);
}
+   /* low layer compatibility */
+   if (TLVP_PRESENT(, GSM48_IE_LOWL_COMPAT) && TLVP_LEN(, 
GSM48_IE_LOWL_COMPAT) > 0 &&
+   TLVP_LEN(, GSM48_IE_LOWL_COMPAT) <= sizeof(setup.llc.compat)) {
+   setup.fields |= MNCC_F_LOWL_COMPAT;
+   setup.llc.len = TLVP_LEN(, GSM48_IE_LOWL_COMPAT);
+   memcpy(setup.llc.compat, TLVP_VAL(, GSM48_IE_LOWL_COMPAT), 
setup.llc.len);
+   }
+   /* high layer compatibility */
+   if (TLVP_PRESENT(, GSM48_IE_HIGHL_COMPAT) && TLVP_LEN(, 
GSM48_IE_HIGHL_COMPAT) > 0 &&
+   TLVP_LEN(, GSM48_IE_HIGHL_COMPAT) <= sizeof(setup.hlc.compat)) {
+   setup.fields |= MNCC_F_HIGHL_COMPAT;
+   setup.hlc.len = TLVP_LEN(, GSM48_IE_HIGHL_COMPAT);
+   memcpy(setup.hlc.compat, TLVP_VAL(, GSM48_IE_HIGHL_COMPAT), 
setup.hlc.len);
+   }
/* user-user */
if (TLVP_PRESENT(, GSM48_IE_USER_USER)) {
setup.fields |= MNCC_F_USERUSER;
@@ -961,6 +975,12 @@
/* called party BCD number */
if (setup->fields & MNCC_F_CALLED)
gsm48_encode_called(msg, >called);
+   /* low layer compatibility */
+   if (setup->fields & MNCC_F_LOWL_COMPAT && setup->llc.len > 0 && 
setup->llc.len <= sizeof(setup->llc.compat))
+   msgb_tlv_put(msg, GSM48_IE_LOWL_COMPAT, setup->llc.len, 
setup->llc.compat);
+   /* high layer compatibility */
+   if (setup->fields & MNCC_F_HIGHL_COMPAT && setup->hlc.len > 0 && 
setup->hlc.len <= sizeof(setup->hlc.compat))
+   msgb_tlv_put(msg, GSM48_IE_HIGHL_COMPAT, setup->hlc.len, 
setup->hlc.compat);
/* user-user */
if (setup->fields & MNCC_F_USERUSER)
gsm48_encode_useruser(msg, 0, >useruser);

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I760980a7e17e2fa81615adc69ef85797eb0c07f1
Gerrit-Change-Number: 35393
Gerrit-PatchSet: 7
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


[S] Change in osmo-msc[master]: ASCI: Remove debug line, used during development process

2024-01-24 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/35545?usp=email )

Change subject: ASCI: Remove debug line, used during development process
..

ASCI: Remove debug line, used during development process

Change-Id: Ie297353146cf30360a7030a2d5ee03e3391cce64
---
M src/libmsc/msc_vgcs.c
1 file changed, 9 insertions(+), 1 deletion(-)

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




diff --git a/src/libmsc/msc_vgcs.c b/src/libmsc/msc_vgcs.c
index d3f2e0e..264fa49 100644
--- a/src/libmsc/msc_vgcs.c
+++ b/src/libmsc/msc_vgcs.c
@@ -1776,7 +1776,6 @@
struct osmo_mobile_identity mi;
int rc;

-   puts(osmo_hexdump(l3, l3_len));
rc = osmo_mobile_identity_decode_from_l3_buf(, l3, l3_len, false);
if (rc < 0) {
LOG_BSS(bss, LOGL_DEBUG, "Talker's Identity cannot be 
decoded.\n");

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ie297353146cf30360a7030a2d5ee03e3391cce64
Gerrit-Change-Number: 35545
Gerrit-PatchSet: 5
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


[S] Change in osmo-msc[master]: Add LLC and HLC information forwarding to MNCC interface

2024-01-24 Thread laforge
Attention is currently required from: jolly.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/35393?usp=email )

Change subject: Add LLC and HLC information forwarding to MNCC interface
..


Patch Set 6: Code-Review+2


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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I760980a7e17e2fa81615adc69ef85797eb0c07f1
Gerrit-Change-Number: 35393
Gerrit-PatchSet: 6
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Wed, 24 Jan 2024 08:50:00 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-msc[master]: Add LLC and HLC information to MNCC interface definiton

2024-01-24 Thread laforge
Attention is currently required from: jolly, neels.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/35392?usp=email )

Change subject: Add LLC and HLC information to MNCC interface definiton
..


Patch Set 5: Code-Review+2


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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I15f5afcf069ee6c1c4641108ceacc837bee311b5
Gerrit-Change-Number: 35392
Gerrit-PatchSet: 5
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-CC: neels 
Gerrit-Attention: jolly 
Gerrit-Attention: neels 
Gerrit-Comment-Date: Wed, 24 Jan 2024 08:49:48 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in libosmocore[master]: tests/gsm0408: add two more samples to bcap_tests[]

2024-01-24 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/35615?usp=email )

Change subject: tests/gsm0408: add two more samples to bcap_tests[]
..

tests/gsm0408: add two more samples to bcap_tests[]

The mismatch for bcap_csd_2400_v22bis is expected, because octet 4
is not represented in 'struct gsm_mncc_bearer_cap' and the encoder
unconditionally hard-codes it to 0x88.

Change-Id: I4fc519c02b4fad8b0f40fa649d9de14b1183d10d
Related: OS#4396, OS#4394
---
M tests/gsm0408/gsm0408_test.c
M tests/gsm0408/gsm0408_test.err
M tests/gsm0408/gsm0408_test.ok
3 files changed, 67 insertions(+), 0 deletions(-)

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




diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c
index 9f92e29..8a89357 100644
--- a/tests/gsm0408/gsm0408_test.c
+++ b/tests/gsm0408/gsm0408_test.c
@@ -53,6 +53,50 @@
},
 };

+static const uint8_t csd_4800_rlp_lv[] = { 0x07, 0xa1, 0x88, 0x89, 0x21, 0x14, 
0x63, 0xa0 };
+
+static const struct gsm_mncc_bearer_cap bcap_csd_4800_rlp = {
+   .transfer   = GSM48_BCAP_ITCAP_UNR_DIG_INF,
+   .mode   = GSM48_BCAP_TMOD_CIRCUIT,
+   .coding = GSM48_BCAP_CODING_GSM_STD,
+   .radio  = GSM48_BCAP_RRQ_FR_ONLY,
+   .speech_ver[0]  = -1,
+   .data = {
+   .rate_adaption  = GSM48_BCAP_RA_V110_X30,
+   .sig_access = GSM48_BCAP_SA_I440_I450,
+   .async  = 1,
+   .nr_stop_bits   = 1,
+   .nr_data_bits   = 8,
+   .user_rate  = GSM48_BCAP_UR_4800,
+   .parity = GSM48_BCAP_PAR_NONE,
+   .interm_rate= GSM48_BCAP_IR_16k,
+   .transp = GSM48_BCAP_TR_RLP,
+   .modem_type = GSM48_BCAP_MT_NONE,
+   },
+};
+
+static const uint8_t csd_2400_v22bis_lv[] = { 0x07, 0xa2, 0xb8, 0x81, 0x21, 
0x13, 0x43, 0x83 };
+
+static const struct gsm_mncc_bearer_cap bcap_csd_2400_v22bis = {
+   .transfer   = GSM48_BCAP_ITCAP_3k1_AUDIO,
+   .mode   = GSM48_BCAP_TMOD_CIRCUIT,
+   .coding = GSM48_BCAP_CODING_GSM_STD,
+   .radio  = GSM48_BCAP_RRQ_FR_ONLY,
+   .speech_ver[0]  = -1,
+   .data = {
+   .rate_adaption  = GSM48_BCAP_RA_NONE,
+   .sig_access = GSM48_BCAP_SA_I440_I450,
+   .async  = 1,
+   .nr_stop_bits   = 1,
+   .nr_data_bits   = 8,
+   .user_rate  = GSM48_BCAP_UR_2400,
+   .parity = GSM48_BCAP_PAR_NONE,
+   .interm_rate= GSM48_BCAP_IR_8k,
+   .transp = GSM48_BCAP_TR_TRANSP,
+   .modem_type = GSM48_BCAP_MT_V22bis,
+   },
+};
+
 static const uint8_t speech_all_lv[] = { 0x06, 0x60, 0x04, 0x02, 0x00, 0x05, 
0x81 };

 static const struct gsm_mncc_bearer_cap bcap_speech_all = {
@@ -86,6 +130,10 @@

 static const struct bcap_test bcap_tests[] = {
{ csd_9600_v110_lv, _csd_9600_v110, "CSD 9600/V.110/transparent" },
+   { csd_4800_rlp_lv, _csd_4800_rlp, "CSD 4800/RLP/non-transparent" },
+   { /* XXX: this testcase is expected to fail because octet 4 is not 
represented in
+  * 'struct gsm_mncc_bearer_cap' and the encoder unconditionally 
hard-codes it to 0x88. */
+ csd_2400_v22bis_lv, _csd_2400_v22bis, "CSD 
2400/V.22bis/transparent" },
{ speech_all_lv, _speech_all, "Speech, all codecs" },
{ speech_no3a_lv, _speech_no3a, "Speech, without octet 3a" },
 };
diff --git a/tests/gsm0408/gsm0408_test.err b/tests/gsm0408/gsm0408_test.err
index 8aeda3e..0102de0 100644
--- a/tests/gsm0408/gsm0408_test.err
+++ b/tests/gsm0408/gsm0408_test.err
@@ -1,3 +1,6 @@
+Incorrect encoded result of CSD 2400/V.22bis/transparent:
+ should: 07 a2 b8 81 21 13 43 83
+ is: 07 a2 88 81 21 13 43 83
 Incorrect encoded result of Speech, without octet 3a:
  should: 01 a0
  is: 02 20 80
diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok
index b966865..721e2c5 100644
--- a/tests/gsm0408/gsm0408_test.ok
+++ b/tests/gsm0408/gsm0408_test.ok
@@ -1,4 +1,6 @@
 Test `CSD 9600/V.110/transparent' passed
+Test `CSD 4800/RLP/non-transparent' passed
+Test `CSD 2400/V.22bis/transparent' failed
 Test `Speech, all codecs' passed
 Test `Speech, without octet 3a' failed
 Simple TMSI encoding testpassed

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35615?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: I4fc519c02b4fad8b0f40fa649d9de14b1183d10d
Gerrit-Change-Number: 35615
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: 

  1   2   >