[M] Change in libosmo-pfcp[master]: add osmo_pfcp_ip_addrs_get

2024-03-18 Thread Jenkins Builder
Jenkins Builder has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-pfcp/+/36348?usp=email )

Change subject: add osmo_pfcp_ip_addrs_get
..


Patch Set 1:

(2 comments)

File src/libosmo-pfcp/pfcp_msg.c:

Robot Comment from checkpatch (run ID jenkins-gerrit-lint-15227):
https://gerrit.osmocom.org/c/libosmo-pfcp/+/36348/comment/16ff848d_a378cb8f
PS1, Line 539:  else
else is not generally useful after a break or return


Robot Comment from checkpatch (run ID jenkins-gerrit-lint-15227):
https://gerrit.osmocom.org/c/libosmo-pfcp/+/36348/comment/1b09a9b1_c02216d7
PS1, Line 545:  else
else is not generally useful after a break or return



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

Gerrit-Project: libosmo-pfcp
Gerrit-Branch: master
Gerrit-Change-Id: I4338a83f26ef2443f90cf835621e73aed5eac521
Gerrit-Change-Number: 36348
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Tue, 19 Mar 2024 03:47:32 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[M] Change in libosmo-pfcp[master]: add osmo_pfcp_ip_addrs_get

2024-03-18 Thread neels
neels has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-pfcp/+/36348?usp=email )


Change subject: add osmo_pfcp_ip_addrs_get
..

add osmo_pfcp_ip_addrs_get

This pattern shows up a lot when working with PFCP. Let's make it easier
to handle IPv4 and v6 at the same time.

Change-Id: I4338a83f26ef2443f90cf835621e73aed5eac521
---
M include/osmocom/pfcp/pfcp_ies_custom.h
M src/libosmo-pfcp/pfcp_msg.c
2 files changed, 52 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-pfcp refs/changes/48/36348/1

diff --git a/include/osmocom/pfcp/pfcp_ies_custom.h 
b/include/osmocom/pfcp/pfcp_ies_custom.h
index 0540bfe..84f862a 100644
--- a/include/osmocom/pfcp/pfcp_ies_custom.h
+++ b/include/osmocom/pfcp/pfcp_ies_custom.h
@@ -25,6 +25,7 @@
 #pragma once

 #include 
+#include 

 #include 

@@ -40,6 +41,11 @@
 int osmo_pfcp_ip_addrs_to_str_buf(char *buf, size_t buflen, const struct 
osmo_pfcp_ip_addrs *addrs);
 char *osmo_pfcp_ip_addrs_to_str_c(void *ctx, const struct osmo_pfcp_ip_addrs 
*addrs);

+int osmo_pfcp_ip_addrs_get(struct osmo_sockaddr *v4, struct osmo_sockaddr *v6,
+  struct osmo_pfcp_ip_addrs *src);
+int osmo_pfcp_ip_addrs_get_str(struct osmo_sockaddr_str *v4, struct 
osmo_sockaddr_str *v6,
+  struct osmo_pfcp_ip_addrs *src);
+
 /* 3GPP TS 29.244 8.2.38, IETF RFC 1035 3.1 */
 struct osmo_pfcp_ie_node_id {
enum osmo_pfcp_node_id_type type;
diff --git a/src/libosmo-pfcp/pfcp_msg.c b/src/libosmo-pfcp/pfcp_msg.c
index abcee18..8ae5ab4 100644
--- a/src/libosmo-pfcp/pfcp_msg.c
+++ b/src/libosmo-pfcp/pfcp_msg.c
@@ -514,6 +514,40 @@
}
 }

+int osmo_pfcp_ip_addrs_get(struct osmo_sockaddr *v4, struct osmo_sockaddr *v6, 
struct osmo_pfcp_ip_addrs *src)
+{
+   if (v4) {
+   if (src->v4_present)
+   *v4 = src->v4;
+   else
+   *v4 = (struct osmo_sockaddr){};
+   }
+   if (v6) {
+   if (src->v6_present)
+   *v6 = src->v6;
+   else
+   *v6 = (struct osmo_sockaddr){};
+   }
+   return 0;
+}
+
+int osmo_pfcp_ip_addrs_get_str(struct osmo_sockaddr_str *v4, struct 
osmo_sockaddr_str *v6, struct osmo_pfcp_ip_addrs *src)
+{
+   if (v4) {
+   if (src->v4_present)
+   return osmo_sockaddr_str_from_sockaddr(v4, 
>v4.u.sas);
+   else
+   *v4 = (struct osmo_sockaddr_str){};
+   }
+   if (v6) {
+   if (src->v6_present)
+   return osmo_sockaddr_str_from_sockaddr(v6, 
>v6.u.sas);
+   else
+   *v6 = (struct osmo_sockaddr_str){};
+   }
+   return 0;
+}
+
 /* If a osmo_fsm_inst placed in m->ctx deallocates before the osmo_pfcp_msg, 
call this function, to make sure to avoid
  * use after free. Alternatively use m->ctx.*_use_count to make sure the FSM 
inst does not deallocate before the
  * osmo_pfcp_msg is discarded from the resend queue. */

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

Gerrit-Project: libosmo-pfcp
Gerrit-Branch: master
Gerrit-Change-Id: I4338a83f26ef2443f90cf835621e73aed5eac521
Gerrit-Change-Number: 36348
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-MessageType: newchange


[S] Change in libosmo-pfcp[master]: pfcp up_function_features: allow shorter lengths

2024-03-18 Thread neels
neels has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-pfcp/+/36347?usp=email )


Change subject: pfcp up_function_features: allow shorter lengths
..

pfcp up_function_features: allow shorter lengths

eUPF sends a short CP Function Features bitmap, which is easy to solve
by just zero padding to the minimum length specified in PFCP (3GPP TS
29.244)

Related: SYS#6590
Change-Id: I40e255fd0b4770e578aea7a10ba88f5eeba087f4
---
M src/libosmo-pfcp/pfcp_ies_custom.c
1 file changed, 18 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-pfcp refs/changes/47/36347/1

diff --git a/src/libosmo-pfcp/pfcp_ies_custom.c 
b/src/libosmo-pfcp/pfcp_ies_custom.c
index e2e9f02..d3ecda5 100644
--- a/src/libosmo-pfcp/pfcp_ies_custom.c
+++ b/src/libosmo-pfcp/pfcp_ies_custom.c
@@ -431,8 +431,10 @@
 int osmo_pfcp_dec_up_function_features(void *decoded_struct, void *decode_to, 
const struct osmo_gtlv_load *tlv)
 {
struct osmo_pfcp_ie_up_function_features *up_function_features = 
decode_to;
-   ENSURE_LENGTH_IS_AT_LEAST(6);
-   memcpy(up_function_features->bits, tlv->val, 6);
+   /* 3GPP TS 29.244 version 16.6.0 Release 16 8.2.25 UP Function Features 
defines at least 6 octets of bits, but
+* if the peer sends less octets, make do with what we get. */
+   memset(up_function_features->bits, 0, 
sizeof(up_function_features->bits));
+   memcpy(up_function_features->bits, tlv->val, 
OSMO_MIN(sizeof(up_function_features->bits), tlv->len));
return 0;
 }


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

Gerrit-Project: libosmo-pfcp
Gerrit-Branch: master
Gerrit-Change-Id: I40e255fd0b4770e578aea7a10ba88f5eeba087f4
Gerrit-Change-Number: 36347
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-MessageType: newchange


[S] Change in libosmo-pfcp[master]: osmo_gtlv_cfg: fix api doc

2024-03-18 Thread neels
neels has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-pfcp/+/36346?usp=email )


Change subject: osmo_gtlv_cfg: fix api doc
..

osmo_gtlv_cfg: fix api doc

Change-Id: Idcbb10edf384f49bd3f685323a68cdbf8b5d009d
---
M include/osmocom/gtlv/gtlv.h
1 file changed, 11 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-pfcp refs/changes/46/36346/1

diff --git a/include/osmocom/gtlv/gtlv.h b/include/osmocom/gtlv/gtlv.h
index d800f71..a6728a4 100644
--- a/include/osmocom/gtlv/gtlv.h
+++ b/include/osmocom/gtlv/gtlv.h
@@ -62,9 +62,9 @@
size_t tl_min_size;

/*! Read one TL from the start of src_data.
-* \param gtlv  Return the T (tag) value read from src_data in 
gtlv->tag.
+* \param gtlv  Return the T (tag) value read from src_data in 
gtlv->ti.tag.
 * Return the L (length) value read from src_data in 
gtlv->len.
-* Return the I (instance) value read from src_data in 
gtlv->len; ignore if there is no I.
+* Return the I (instance) value read from src_data in 
gtlv->ti.instance; ignore if there is no I.
 * Return the position just after the TL in gtlv->*val. If 
there is V data, point at the start of the
 * V data in src_data. If there is no V data, point at the 
byte just after the TL part in src_data.
 * \param src_data  Part of raw message being decoded.

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

Gerrit-Project: libosmo-pfcp
Gerrit-Branch: master
Gerrit-Change-Id: Idcbb10edf384f49bd3f685323a68cdbf8b5d009d
Gerrit-Change-Number: 36346
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-MessageType: newchange


[S] Change in osmo-mgw[master]: mgw: do not fail MGCP on codec mismatch

2024-03-18 Thread neels
neels has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/35302?usp=email )

Change subject: mgw: do not fail MGCP on codec mismatch
..

mgw: do not fail MGCP on codec mismatch

Before this patch, when an CRCX+MDCX wants to set a codec list that has
no match with the codecs for the other conn of that same endpoint,
osmo-mgw returns an MGCP "FAIL" response.

When a client wants to change the codec, it has to do that one RTP port
at a time. So osmo-mgw *must* allow to configure an MGCP conn with a
codec choice that mismatches the other conn.

This is crucial to allow codec negotiation in osmo-msc: if MO has
already assigned a specific codec, and later wants to re-assign to the
codec that MT has chosen, the codec needs to be changed at osmo-mgw.

This patch is the minimal fix required to get re-assignment to a
different codec to work (via osmo-msc). There is more work to be done
about this bit of code in osmo-mgw, but keep that to a separate patch.

In detail, before this patch, we fail both
- when a side has no codecs,
- or when there is no single match between codecs of the two sides of
  the endpoint.
Remove only the second condition; after this patch, still fail when a
side has no codecs -- this allows mgcp_test.c to still pass.

Related: OS#6293
Related: osmo-msc I8760feaa8598047369ef8c3ab2673013bac8ac8a
Change-Id: I3d1163fe622bdd7dc42a485f796072524ab39db9
---
M src/libosmo-mgcp/mgcp_codec.c
1 file changed, 45 insertions(+), 1 deletion(-)

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




diff --git a/src/libosmo-mgcp/mgcp_codec.c b/src/libosmo-mgcp/mgcp_codec.c
index 4626d03..2f1df7b 100644
--- a/src/libosmo-mgcp/mgcp_codec.c
+++ b/src/libosmo-mgcp/mgcp_codec.c
@@ -455,7 +455,17 @@
}
}

-   return -EINVAL;
+   if (conn_dst->end.codecs_assigned)
+   conn_dst->end.codec = _dst->end.codecs[0];
+   else
+   return -EINVAL;
+
+   if (conn_src->end.codecs_assigned)
+   conn_src->end.codec = _src->end.codecs[0];
+   else
+   return -EINVAL;
+
+   return 0;
 }

 /* Check if the codec has a specific AMR mode (octet-aligned or 
bandwith-efficient) set. */

--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/35302?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: I3d1163fe622bdd7dc42a485f796072524ab39db9
Gerrit-Change-Number: 35302
Gerrit-PatchSet: 7
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[S] Change in libosmocore[master]: sockaddr_str: add conversion to,from osmo_sockaddr

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

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

Change subject: sockaddr_str: add conversion to,from osmo_sockaddr
..


Patch Set 1:

(1 comment)

Patchset:

PS1:
> Missing update in TODO-RELEASE.
do you really need a TODO-RELEASE entry for an added function?
the changelog will anyway list the commit log summary.



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36265?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: I0df84b4bb8cb5d8434b735fa3a38e7f95be43e91
Gerrit-Change-Number: 36265
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Tue, 19 Mar 2024 03:37:58 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[S] Change in osmo-ttcn3-hacks[master]: pgw: Set Gy CCA Result-Code based on settings

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


Change subject: pgw: Set Gy CCA Result-Code based on settings
..

pgw: Set Gy CCA Result-Code based on settings

This allows the test to change the Result-Code being transmitted during
Gy CCA at any time.

Related: SYS#6845
Change-Id: I2c3b1057908c1c76a55c41a7f45728a0fdee3cf0
---
M ggsn_tests/GGSN_Tests.ttcn
M library/DIAMETER_ts32_299_Templates.ttcn
M pgw/PGW_Tests.ttcn
3 files changed, 33 insertions(+), 9 deletions(-)



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

diff --git a/ggsn_tests/GGSN_Tests.ttcn b/ggsn_tests/GGSN_Tests.ttcn
index 55720ee..74c2e8c 100644
--- a/ggsn_tests/GGSN_Tests.ttcn
+++ b/ggsn_tests/GGSN_Tests.ttcn
@@ -686,7 +686,7 @@
}
} else {
tx_dia := ts_DIA_Gy_CCA(g_rx_gy.hop_by_hop_id, 
g_rx_gy.end_to_end_id, sess_id,
-req_type, req_num);
+   DIAMETER_SUCCESS, 
req_type, req_num);
}
Gy_UNIT.send(tx_dia);
}
diff --git a/library/DIAMETER_ts32_299_Templates.ttcn 
b/library/DIAMETER_ts32_299_Templates.ttcn
index af8f514..c22b6fa 100644
--- a/library/DIAMETER_ts32_299_Templates.ttcn
+++ b/library/DIAMETER_ts32_299_Templates.ttcn
@@ -41,13 +41,14 @@
 template (value) PDU_DIAMETER
 ts_DIA_Gy_CCA(template (value) UINT32 hbh_id, template (value) UINT32 ete_id,
   template (value) octetstring sess_id,
+  template (value) DIAMETER_Resultcode res_code,
   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_CREDIT_CONTROL_AID, 4), 
hbh_id:=hbh_id, ete_id:=ete_id,
avps := {
ts_AVP_SessionId(sess_id),
-   ts_AVP_ResultCode(DIAMETER_SUCCESS),
+   ts_AVP_ResultCode(res_code),
ts_AVP_OriginHost("ocs.localdomain"),
ts_AVP_OriginRealm("localdomain"),
ts_AVP_AuthAppId(int2oct(c_DIAMETER_CREDIT_CONTROL_AID, 4)),
diff --git a/pgw/PGW_Tests.ttcn b/pgw/PGW_Tests.ttcn
index fb893fc..0fa7394 100644
--- a/pgw/PGW_Tests.ttcn
+++ b/pgw/PGW_Tests.ttcn
@@ -132,6 +132,14 @@
OCT4teid_remote optional
 };

+type record SessionParsGy {
+   /* In seconds. 0 => disabled, !0 => grant over CC-Time period */
+   integer validity_time,
+
+   /* Result-Code to use when sending Gy CCA, usually DIAMETER_SUCCESS */
+   DIAMETER_Resultcode cca_res_code
+};
+
 /* configuration data for a given Session */
 type record SessionPars {
hexstring   imsi,
@@ -159,8 +167,7 @@
charstring  tun_dev_name,
charstring  tun_netns_name optional,

-   /* In seconds. 0 => disabled, !0 => grant over CC-Time period */
-   integer gy_validity_time
+   SessionParsGy gy
 }

 template (value) SessionPars
@@ -188,7 +195,10 @@
},
tun_dev_name := tundev,
tun_netns_name := tundev,
-   gy_validity_time := 0
+   gy := {
+   validity_time := 0,
+   cca_res_code := DIAMETER_SUCCESS
+   }
 }


@@ -588,12 +598,12 @@

avp := f_DIAMETER_get_avp(g_rx_gy, 
c_AVP_Code_DCC_NONE_CC_Request_Number);
req_num := valueof(avp.avp_data.avp_DCC_NONE_CC_Request_Number);
-   if (g_pars.gy_validity_time > 0) {
+   if (g_pars.gy.validity_time > 0) {
tx_dia := 
ts_DIA_Gy_CCA_ValidityTime(g_rx_gy.hop_by_hop_id, g_rx_gy.end_to_end_id, 
sess_id,
-req_type, req_num, 
g_pars.gy_validity_time);
+req_type, req_num, 
g_pars.gy.validity_time);
} else {
tx_dia := ts_DIA_Gy_CCA(g_rx_gy.hop_by_hop_id, 
g_rx_gy.end_to_end_id, sess_id,
-req_type, req_num);
+   g_pars.gy.cca_res_code, 
req_type, req_num);
}
Gy.send(tx_dia);
}
@@ -1046,7 +1056,7 @@
 testcase TC_gy_charging_cc_time() runs on PGW_Test_CT {
var PGW_Session_CT vc_conn;
var SessionPars pars := valueof(t_SessionPars('001010123456789'H, 
"tun23"));
-   pars.gy_validity_time := 3; /* Grant access for 3 seconds, needs to be 
re-validated afterwards */
+   pars.gy.validity_time := 3; /* Grant access for 3 seconds, needs to be 
re-validated afterwards */
f_init();
vc_conn := f_start_handler(refers(f_TC_gy_charging_cc_time), pars);
vc_conn.done;

--
To view, visit 

[S] Change in osmo-ttcn3-hacks[master]: DIAMETER_ts32_299_Templates.ttcn: Define Result codes specified in TS

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


Change subject: DIAMETER_ts32_299_Templates.ttcn: Define Result codes specified 
in TS
..

DIAMETER_ts32_299_Templates.ttcn: Define Result codes specified in TS

Change-Id: I6c102e6a10469d0d054cb55f7d2100c8887ab6e0
---
M library/DIAMETER_ts32_299_Templates.ttcn
1 file changed, 22 insertions(+), 1 deletion(-)



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

diff --git a/library/DIAMETER_ts32_299_Templates.ttcn 
b/library/DIAMETER_ts32_299_Templates.ttcn
index c22b6fa..55402ab 100644
--- a/library/DIAMETER_ts32_299_Templates.ttcn
+++ b/library/DIAMETER_ts32_299_Templates.ttcn
@@ -18,11 +18,23 @@
 import from Misc_Helpers all;

 /***
- * S6a 3GPP TS 32.299 section 7
+ * Gy 3GPP TS 32.299 section 7
  ***/

 /* Gy AID : 3GPP TS 32.299 7.1.6, RFC4006 3.1: c_DIAMETER_CREDIT_CONTROL_AID */

+/* 3GPP TS 32.299  7.1.11 Result-Code AVP*/
+type enumerated DIAMETER_ts32_229_Resultcode {
+   /* transient */
+   DIAMETER_END_USER_SERVICE_DENIED(4010),
+   DIAMETER_CREDIT_CONTROL_NOT_APPLICABLE  (4011),
+   DIAMETER_CREDIT_LIMIT_REACHED   (4012),
+   /* permanent */
+   DIAMETER_AUTHORIZATION_REJECTED (5003),
+   DIAMETER_USER_UNKNOWN   (5030),
+   DIAMETER_RATING_FAILED  (5031)
+}
+
 /* 3GPP TS 32.299 6.4.2 Credit-Control-Request */
 template (present) PDU_DIAMETER
 tr_DIA_Gy_CCR(template (present) DCC_NONE_CC_Request_Type req_type := 
INITIAL_REQUEST)

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


[S] Change in osmo-ttcn3-hacks[master]: pgw: Fix typo in comment

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


Change subject: pgw: Fix typo in comment
..

pgw: Fix typo in comment

Change-Id: Ie768044d9f80cc3837685167d98a1e270d0abde4
---
M pgw/PGW_Tests.ttcn
1 file changed, 10 insertions(+), 1 deletion(-)



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

diff --git a/pgw/PGW_Tests.ttcn b/pgw/PGW_Tests.ttcn
index 281f816..fb893fc 100644
--- a/pgw/PGW_Tests.ttcn
+++ b/pgw/PGW_Tests.ttcn
@@ -1031,7 +1031,7 @@

d := activate(as_DIA_Gy_CCR(UPDATE_REQUEST));
f_ping4(mp_ping_hostname);
-   /* Let the CCA reach the GGSN */
+   /* Let the CCA reach the PGW */
f_sleep(0.5);
deactivate(d);
f_validate_gy_cc_report(g_rx_gy, VALIDITY_TIME, (3..4), (28..1000), 
(28..1000));

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


[M] Change in osmo-ttcn3-hacks[master]: epdg: Introduce test TC_hss_initiated_update_user_profile(_unknown)

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

Change subject: epdg: Introduce test 
TC_hss_initiated_update_user_profile(_unknown)
..

epdg: Introduce test TC_hss_initiated_update_user_profile(_unknown)

This test so far only validates the SWx interface during the procedure.
It can be extended at a later time when implementing propagation of the
procedure to other interfaces in osmo-epdg.

Related: OS#6042
Change-Id: Ic7c19a3fe7b2b1411414fb6b78ab9a665a1aa42b
---
M epdg/EPDG_Tests.ttcn
M epdg/expected-results.xml
M library/DIAMETER_ts29_273_Templates.ttcn
3 files changed, 147 insertions(+), 0 deletions(-)

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




diff --git a/epdg/EPDG_Tests.ttcn b/epdg/EPDG_Tests.ttcn
index bc4219b..1742fd7 100644
--- a/epdg/EPDG_Tests.ttcn
+++ b/epdg/EPDG_Tests.ttcn
@@ -471,6 +471,32 @@
}
 }

+/* Send PPR as HSS to AAA server, expect back PPA */
+private function f_DIA_SWx_PP(template (present) GenericAVP exp_result_tmpl := 
tr_AVP_ResultCode(DIAMETER_SUCCESS)) runs on EPDG_ConnHdlr {
+   var PDU_DIAMETER rx_dia;
+   var UINT32 hbh_id := f_rnd_octstring(4);
+   var UINT32 ete_id := f_rnd_octstring(4);
+   var octetstring reason_info := char2oct("test");
+
+   /* Unlike PPR, PPA contains no IMSI. Register ete_id in 
DIAMETER_Emulation,
+* so PPA is forwarded back to us in DIAMETER port instead of 
MTC_CT.DIAMETER_UNIT.
+*/
+   f_epdg_connhldr_SWx_expect_eteid(ete_id);
+
+   SWx.send(ts_DIA_SWx_PPR(g_pars.imsi,
+   IPv4,
+   g_pars.apn,
+   hbh_id := hbh_id,
+   ete_id := ete_id));
+
+   alt {
+   [] SWx.receive(tr_DIA_SWx_PPA(exp_result_tmpl, hbh_id := hbh_id, ete_id 
:= ete_id)) -> value rx_dia {}
+   [] SWx.receive(PDU_DIAMETER:?) -> value rx_dia {
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, 
log2str("Unexpected Diameter SWx msg rx: ", rx_dia));
+   }
+   }
+}
+
 /* Send RTR as HSS to AAA server, expect back RTA */
 private function f_DIA_SWx_RT(template (value) CxDx_3GPP_Reason_Code 
reason_code,
  template (present) GenericAVP exp_result_tmpl := 
tr_AVP_ResultCode(DIAMETER_SUCCESS),
@@ -1138,6 +1164,41 @@
setverdict(pass);
 }

+/*
+ * 3GPP TS 29.273 8.1.2.3 HSS Initiated Update of User Profile
+ * 3GPP TS 29.273 8.2.2.2 HSS Initiated Update of User Profile Procedure
+ */
+private function f_TC_hss_initiated_update_user_profile(charstring id) runs on 
EPDG_ConnHdlr {
+   f_initial_attach();
+   /* Procedure should be performed properly: */
+   f_DIA_SWx_PP(tr_AVP_ResultCode(DIAMETER_SUCCESS));
+}
+testcase TC_hss_initiated_update_user_profile() runs on MTC_CT {
+   var EPDG_ConnHdlrPars pars := f_init_pars();
+   var EPDG_ConnHdlr vc_conn;
+   f_init();
+   vc_conn := 
f_start_handler(refers(f_TC_hss_initiated_update_user_profile), pars);
+   vc_conn.done;
+   setverdict(pass);
+}
+
+/*
+ * Same as TC_hss_initiated_update_user_profile_unknown, but without 
registering
+ * subscriber first, so expect DIAMETER_ERROR_USER_UNKNOWN in answer.
+ */
+private function f_TC_hss_initiated_update_user_profile_unknown(charstring id) 
runs on EPDG_ConnHdlr {
+   var DIAMETER_ts29_229_ExperimentalResultcode erc := 
DIAMETER_ERROR_USER_UNKNOWN;
+   f_DIA_SWx_PP(tr_AVP_ExperimentalResult(vendor_id_3GPP, 
int2oct(enum2int(erc), 4)));
+}
+testcase TC_hss_initiated_update_user_profile_unknown() runs on MTC_CT {
+   var EPDG_ConnHdlrPars pars := f_init_pars();
+   var EPDG_ConnHdlr vc_conn;
+   f_init();
+   vc_conn := 
f_start_handler(refers(f_TC_hss_initiated_update_user_profile_unknown), pars);
+   vc_conn.done;
+   setverdict(pass);
+}
+
 private function f_TC_concurrent_ues(charstring id) runs on EPDG_ConnHdlr {
COORD.send(COORD_CMD_READY);
COORD.receive(COORD_CMD_START);
@@ -1236,6 +1297,8 @@
execute ( TC_s2b_CreateSession_rejected() );
execute ( TC_hss_initiated_deregister_new_server_assigned() );
execute ( TC_hss_initiated_deregister_permanent_termination() );
+   execute ( TC_hss_initiated_update_user_profile() );
+   execute ( TC_hss_initiated_update_user_profile_unknown() );
execute ( TC_concurrent_ues2() );
execute ( TC_concurrent_ues100() );
execute ( TC_upf_echo_req() );
diff --git a/epdg/expected-results.xml b/epdg/expected-results.xml
index ccc69cb..83155cd 100644
--- a/epdg/expected-results.xml
+++ b/epdg/expected-results.xml
@@ -9,6 +9,8 @@
   
   
   
+  
+  
   
   
   
diff --git a/library/DIAMETER_ts29_273_Templates.ttcn 
b/library/DIAMETER_ts29_273_Templates.ttcn
index 

[M] Change in osmo-ttcn3-hacks[master]: epdg: TC_hss_initiated_update_user_profile: test SWx PPR -> S6b RAR p...

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

Change subject: epdg: TC_hss_initiated_update_user_profile: test SWx PPR -> S6b 
RAR propagation
..

epdg: TC_hss_initiated_update_user_profile: test SWx PPR -> S6b RAR propagation

Related: OS#6400
Change-Id: I064ee9e18809a507d0185f640b4a972ee5a2ce3f
---
M epdg/EPDG_Tests.ttcn
M library/DIAMETER_Templates.ttcn
M library/DIAMETER_ts29_273_Templates.ttcn
3 files changed, 125 insertions(+), 6 deletions(-)

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




diff --git a/epdg/EPDG_Tests.ttcn b/epdg/EPDG_Tests.ttcn
index 1742fd7..f963994 100644
--- a/epdg/EPDG_Tests.ttcn
+++ b/epdg/EPDG_Tests.ttcn
@@ -472,7 +472,8 @@
 }

 /* Send PPR as HSS to AAA server, expect back PPA */
-private function f_DIA_SWx_PP(template (present) GenericAVP exp_result_tmpl := 
tr_AVP_ResultCode(DIAMETER_SUCCESS)) runs on EPDG_ConnHdlr {
+private function f_DIA_SWx_PP(template (present) GenericAVP exp_result_tmpl := 
tr_AVP_ResultCode(DIAMETER_SUCCESS),
+ boolean exp_aaa_proc := true) runs on 
EPDG_ConnHdlr {
var PDU_DIAMETER rx_dia;
var UINT32 hbh_id := f_rnd_octstring(4);
var UINT32 ete_id := f_rnd_octstring(4);
@@ -489,6 +490,24 @@
hbh_id := hbh_id,
ete_id := ete_id));

+   if (exp_aaa_proc) {
+   /* TODO: in successful case, we want to validate how this 
procedure extends to other interfaces:
+   * """ 3GPP TS 29.273 8.1.2.3.3:
+   * After a successful user profile download, the 3GPP AAA Server 
shall
+   * initiate re-authentication procedure as described
+   * in clause 7.2.2.4 if the subscriber has previously been 
authenticated
+   * and authorized to untrusted non-3GPP access.
+   * """
+   */
+   /* TS 29.273 9.1.2.5.1:
+* "The Service Authorization Information Update procedure is 
performed in two steps":
+* step 1: */
+   as_DIA_S6b_RA_success();
+   /* step 2 */
+   /* Since PGW Address didn't change, expect no SAR+SAA triggered 
as a consequence to AAR+AAA. */
+   f_S6b_AA_success(exp_swx_sa_proc := false);
+   }
+
alt {
[] SWx.receive(tr_DIA_SWx_PPA(exp_result_tmpl, hbh_id := hbh_id, ete_id 
:= ete_id)) -> value rx_dia {}
[] SWx.receive(PDU_DIAMETER:?) -> value rx_dia {
@@ -536,7 +555,7 @@


 /* Send AAR as PGW to AAA server, expect back AAA */
-private function f_S6b_AA_success() runs on EPDG_ConnHdlr {
+private function f_S6b_AA_success(boolean exp_swx_sa_proc := true) runs on 
EPDG_ConnHdlr {
var PDU_DIAMETER rx_dia;
var UINT32 hbh_id := f_rnd_octstring(4);
var UINT32 ete_id := f_rnd_octstring(4);
@@ -555,8 +574,10 @@
pgw_addr,
hbh_id := hbh_id, ete_id := ete_id));

-   /* AAR in S6b in AAA-Server triggers Service-Assignment Request/Answer 
towards HSS: */
-   as_DIA_SWx_SA_success();
+   if (exp_swx_sa_proc) {
+   /* AAR in S6b in AAA-Server triggers Service-Assignment 
Request/Answer towards HSS: */
+   as_DIA_SWx_SA_success();
+   }

alt {
[] S6b.receive(tr_DIA_S6b_AAA) -> value rx_dia {}
@@ -587,6 +608,25 @@
}
 }

+/* Diameter S6b RAR + RAA, TS 29.273 9.1.2.5. */
+private altstep as_DIA_S6b_RA_success() runs on EPDG_ConnHdlr {
+   var PDU_DIAMETER rx_dia;
+   var template (omit) AVP avp;
+   var octetstring sess_id;
+   [] S6b.receive(tr_DIA_S6b_RAR(f_nai())) -> value rx_dia {
+   avp := f_DIAMETER_get_avp(rx_dia, 
c_AVP_Code_BASE_NONE_Session_Id);
+   sess_id := valueof(avp.avp_data.avp_BASE_NONE_Session_Id);
+   S6b.send(ts_DIA_S6b_RAA(DIAMETER_SUCCESS,
+   sess_id := sess_id,
+   hbh_id := rx_dia.hop_by_hop_id,
+   ete_id := rx_dia.end_to_end_id));
+   setverdict(pass);
+   }
+   [] S6b.receive(PDU_DIAMETER:?) -> value rx_dia {
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, 
log2str("Unexpected Diameter S6b msg rx: ", rx_dia));
+   }
+}
+
 /* Diameter S6b ASR + ASA, TS 29.273 9.1.2.3.4. */
 private altstep as_DIA_S6b_AS_success() runs on EPDG_ConnHdlr {
var PDU_DIAMETER rx_dia;
@@ -602,7 +642,7 @@
setverdict(pass);
}
[] S6b.receive(PDU_DIAMETER:?) -> value rx_dia {
-   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, 
log2str("Unexpected Diameter msg rx: ", rx_dia));
+   Misc_Helpers.f_shutdown(__BFILE__, 

[M] Change in osmo-ttcn3-hacks[master]: epdg: TC_hss_initiated_update_user_profile: test SWx PPR -> S6b RAR p...

2024-03-18 Thread pespin
Attention is currently required from: fixeria, laforge, lynxis lazus.

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

Change subject: epdg: TC_hss_initiated_update_user_profile: test SWx PPR -> S6b 
RAR propagation
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36307?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: I064ee9e18809a507d0185f640b4a972ee5a2ce3f
Gerrit-Change-Number: 36307
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Mon, 18 Mar 2024 17:29:13 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-ttcn3-hacks[master]: epdg: Introduce test TC_hss_initiated_update_user_profile(_unknown)

2024-03-18 Thread pespin
Attention is currently required from: fixeria, laforge, lynxis lazus.

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

Change subject: epdg: Introduce test 
TC_hss_initiated_update_user_profile(_unknown)
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36285?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: Ic7c19a3fe7b2b1411414fb6b78ab9a665a1aa42b
Gerrit-Change-Number: 36285
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Mon, 18 Mar 2024 17:29:11 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in ...osmo-epdg[master]: epdg: Trigger AAR+AAA upon rx of RAR

2024-03-18 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36340?usp=email )

Change subject: epdg: Trigger AAR+AAA upon rx of RAR
..

epdg: Trigger AAR+AAA upon rx of RAR

Related: OS#6406
Change-Id: I478b781e65eb5dd0cce5b51c75a1aa592b6555bc
---
M src/aaa_diameter_swm.erl
M src/aaa_ue_fsm.erl
M src/epdg_diameter_swm.erl
M src/epdg_ue_fsm.erl
4 files changed, 150 insertions(+), 17 deletions(-)

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




diff --git a/src/aaa_diameter_swm.erl b/src/aaa_diameter_swm.erl
index fadff7e..0f5e279 100644
--- a/src/aaa_diameter_swm.erl
+++ b/src/aaa_diameter_swm.erl
@@ -17,6 +17,7 @@
 -export([rx_der_auth_request/4,
 rx_der_auth_compl_request/2,
 rx_reauth_answer/2,
+rx_auth_request/1,
 rx_session_termination_request/1,
 rx_abort_session_answer/1]).
 -export([tx_dea_auth_response/2,
@@ -65,6 +66,10 @@
 rx_reauth_answer(Imsi, Result) ->
gen_server:cast(?SERVER, {raa, Imsi, Result}).

+% 3GPP TS 29.273 7.2.2.1.3 Diameter-AA-Request (AAR) Command
+rx_auth_request(Imsi) ->
+   gen_server:cast(?SERVER, {aar, Imsi}).
+
 rx_session_termination_request(Imsi) ->
gen_server:cast(?SERVER, {str, Imsi}).

@@ -98,6 +103,22 @@
end,
{noreply, State};

+handle_cast({aar, Imsi}, State) ->
+   case aaa_ue_fsm:get_pid_by_imsi(Imsi) of
+   Pid when is_pid(Pid) ->
+   case aaa_ue_fsm:ev_rx_swm_auth_request(Pid) of
+   ok ->
+   epdg_diameter_swm:rx_auth_answer(Imsi, ok);
+   _ ->
+   RC_UNABLE_TO_COMPLY=5012,
+   epdg_diameter_swm:rx_auth_answer(Imsi, {error, 
RC_UNABLE_TO_COMPLY})
+   end;
+   undefined ->
+   RC_USER_UNKNOWN=5030,
+   epdg_diameter_swm:rx_auth_answer(Imsi, {error, RC_USER_UNKNOWN})
+   end,
+   {noreply, State};
+
 handle_cast({str, Imsi}, State) ->
case aaa_ue_fsm:get_pid_by_imsi(Imsi) of
Pid when is_pid(Pid) ->
diff --git a/src/aaa_ue_fsm.erl b/src/aaa_ue_fsm.erl
index abbe40e..968c7bd 100644
--- a/src/aaa_ue_fsm.erl
+++ b/src/aaa_ue_fsm.erl
@@ -43,7 +43,8 @@
 -export([init/1,callback_mode/0,terminate/3]).
 -export([get_server_name_by_imsi/1, get_pid_by_imsi/1]).
 -export([ev_rx_swm_der_auth_req/2, ev_rx_swm_der_auth_compl/2,
- ev_rx_swm_reauth_answer/2, ev_rx_swm_str/1, ev_rx_swm_asa/1,
+ ev_rx_swm_reauth_answer/2, ev_rx_swm_auth_request/1,
+ ev_rx_swm_str/1, ev_rx_swm_asa/1,
  ev_rx_swx_maa/2, ev_rx_swx_saa/2, ev_rx_swx_ppr/2, ev_rx_swx_rtr/1,
  ev_rx_s6b_aar/2, ev_rx_s6b_str/1, ev_rx_s6b_raa/2, ev_rx_s6b_asa/2]).
 -export([state_new/3,
@@ -104,6 +105,15 @@
 {error, Err}
 end.

+ev_rx_swm_auth_request(Pid) ->
+lager:info("ue_fsm ev_rx_swm_auth_request~n", []),
+try
+gen_statem:call(Pid, rx_swm_auth_request)
+catch
+exit:Err ->
+{error, Err}
+end.
+
 ev_rx_swm_der_auth_compl(Pid, Apn) ->
 lager:info("ue_fsm ev_rx_swm_der_auth_compl~n", []),
 try
@@ -371,6 +381,11 @@
 %% SWx PPA was already answered immediately when PPR was received, 
nothing to do here.
 {keep_state, Data, [{reply,From,ok}]};

+state_authenticated({call, From}, rx_swm_auth_request, Data) ->
+lager:info("ue_fsm state_authenticated event=rx_swm_auth_request, 
~p~n", [Data]),
+%% answer is trnamsitted when returning ok:
+{keep_state, Data, [{reply,From,ok}]};
+
 state_authenticated({call, From}, {rx_s6b_raa, Result}, Data) ->
 lager:info("ue_fsm state_authenticated event=rx_s6b_raa ~p, ~p~n", 
[Result, Data]),
 %% SWx PPA was already answered immediately when PPR was received, 
nothing to do here.
diff --git a/src/epdg_diameter_swm.erl b/src/epdg_diameter_swm.erl
index cdf572f..ba5893c 100644
--- a/src/epdg_diameter_swm.erl
+++ b/src/epdg_diameter_swm.erl
@@ -15,13 +15,15 @@
 -export([code_change/3, terminate/2]).

 -export([tx_der_auth_request/4,
-tx_reauth_answer/2,
 tx_der_auth_compl_request/2,
+tx_reauth_answer/2,
+tx_auth_req/1,
 tx_session_termination_request/1,
 tx_abort_session_answer/1]).
 -export([rx_dea_auth_response/2,
 rx_dea_auth_compl_response/2,
 rx_reauth_request/1,
+rx_auth_answer/2,
 rx_session_termination_answer/2,
 rx_abort_session_request/1]).

@@ -56,6 +58,12 @@
ImsiStr = binary_to_list(Imsi),
ok = gen_server:cast(?SERVER, {tx_dia, {der_auth_compl_req, ImsiStr, 
Apn}}).

+% 3GPP TS 29.273 7.1.2.2
+tx_auth_req(Imsi) ->
+   % In Diameter we use Imsi as strings, as done by diameter module.
+   ImsiStr = binary_to_list(Imsi),
+   ok = gen_server:cast(?SERVER, {tx_dia, {aar, ImsiStr}}).
+
 % 3GPP TS 29.273 7.1.2.3

[S] Change in ...osmo-epdg[master]: epdg: Tx SWm RAA from within epdg_ue_fsm

2024-03-18 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36339?usp=email )

Change subject: epdg: Tx SWm RAA from within epdg_ue_fsm
..

epdg: Tx SWm RAA from within epdg_ue_fsm

Since previous commits, it is possible to transmit SWm messages from
within the epdg_ue_fsm, so do it now.

Change-Id: Ib31cf1ab4c7e10c910e54b9908b62eee26ee3cba
---
M src/epdg_diameter_swm.erl
M src/epdg_ue_fsm.erl
2 files changed, 15 insertions(+), 14 deletions(-)

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




diff --git a/src/epdg_diameter_swm.erl b/src/epdg_diameter_swm.erl
index bf7c0b1..cdf572f 100644
--- a/src/epdg_diameter_swm.erl
+++ b/src/epdg_diameter_swm.erl
@@ -147,14 +147,7 @@
Imsi = list_to_binary(ImsiStr),
case epdg_ue_fsm:get_pid_by_imsi(Imsi) of
Pid when is_pid(Pid) ->
-   case epdg_ue_fsm:received_swm_reauth_request(Pid) of
-   ok ->
-   DiaResultCode = 2001, %% SUCCESS
-   aaa_diameter_swm:rx_reauth_answer(ImsiStr, 
DiaResultCode);
-   _ ->
-   DiaResultCode = 5012, %% UNABLE_TO_COMPLY
-   aaa_diameter_swm:rx_reauth_answer(ImsiStr, 
DiaResultCode)
-   end;
+   epdg_ue_fsm:received_swm_reauth_request(Pid);
undefined ->
lager:notice("SWm Rx RAR: unknown swm-session ~p", [Imsi]),
DiaResultCode = 5002, %% UNKNOWN_SESSION_ID
diff --git a/src/epdg_ue_fsm.erl b/src/epdg_ue_fsm.erl
index 062083b..8a0c16e 100644
--- a/src/epdg_ue_fsm.erl
+++ b/src/epdg_ue_fsm.erl
@@ -341,14 +341,12 @@

 state_authenticated({call, From}, received_swm_reauth_request, Data) ->
 lager:info("ue_fsm state_authenticated 
event=received_swm_reauth_request, ~p~n", [Data]),
+epdg_diameter_swm:tx_reauth_answer(Data#ue_fsm_data.imsi, 
#epdg_dia_rc{result_code = 2001}),
 % TODO: 3GPP TS 29.273  7.1.2.5.1:
 % Upon receiving the re-authorization request, the ePDG shall 
immediately invoke the authorization procedure
 % specified in 7.1.2.2 for the session indicated in the request. This 
procedure is based on the Diameter
 % commands AA-Request (AAR) and AA-Answer (AAA) specified in IETF RFC 
4005 [4]. Information
 % element contents for these messages are shown in tables 7.1.2.2.1/1 
and 7.1.2.2.1/2.
-%
-% This is done synchronously for now when returning from call:
-%%epdg_diameter_swm:tx_reauth_answer(Data#ue_fsm_data.imsi, 
#epdg_dia_rc{result_code = 2001}),
 {keep_state, Data, [{reply,From,ok}]};

 state_authenticated({call, From}, purge_ms_request, Data) ->
@@ -422,14 +420,12 @@

 state_active({call, From}, received_swm_reauth_request, Data) ->
 lager:info("ue_fsm state_active event=received_swm_reauth_request, 
~p~n", [Data]),
+epdg_diameter_swm:tx_reauth_answer(Data#ue_fsm_data.imsi, 
#epdg_dia_rc{result_code = 2001}),
 % TODO: 3GPP TS 29.273  7.1.2.5.1:
 % Upon receiving the re-authorization request, the ePDG shall 
immediately invoke the authorization procedure
 % specified in 7.1.2.2 for the session indicated in the request. This 
procedure is based on the Diameter
 % commands AA-Request (AAR) and AA-Answer (AAA) specified in IETF RFC 
4005 [4]. Information
 % element contents for these messages are shown in tables 7.1.2.2.1/1 
and 7.1.2.2.1/2.
-%
-% This is done synchronously for now when returning from call:
-%%epdg_diameter_swm:tx_reauth_answer(Data#ue_fsm_data.imsi, 
#epdg_dia_rc{result_code = 2001}),
 {keep_state, Data, [{reply,From,ok}]};

 state_active({call, From}, purge_ms_request, Data) ->

--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36339?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: Ib31cf1ab4c7e10c910e54b9908b62eee26ee3cba
Gerrit-Change-Number: 36339
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[S] Change in ...osmo-epdg[master]: epdg_ue_fsm: Properly define type of field in record

2024-03-18 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36341?usp=email )

Change subject: epdg_ue_fsm: Properly define type of field in record
..

epdg_ue_fsm: Properly define type of field in record

Change-Id: I0d1c91be2fadbcfecef8ca5aaf6df07b98a834f2
---
M src/epdg_ue_fsm.erl
1 file changed, 10 insertions(+), 1 deletion(-)

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




diff --git a/src/epdg_ue_fsm.erl b/src/epdg_ue_fsm.erl
index 4a090e9..bb4602f 100644
--- a/src/epdg_ue_fsm.erl
+++ b/src/epdg_ue_fsm.erl
@@ -68,7 +68,7 @@
 imsi,
 apn = "internet":: string(),
 pgw_rem_addr_list   = []:: list(),
-tun_pdp_ctx :: epdg_tun_pdp_ctx,
+tun_pdp_ctx :: #epdg_tun_pdp_ctx{},
 tear_down_gsup_needed   = false :: boolean(), %% need to send 
GSUP PurgeMSResp after STR+STA?
 tear_down_gsup_cause= 0 :: integer(),
 tear_down_s2b_needed= false :: boolean(), %% need to send 
S2b DeleteSessionReq

--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36341?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: I0d1c91be2fadbcfecef8ca5aaf6df07b98a834f2
Gerrit-Change-Number: 36341
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[M] Change in ...osmo-epdg[master]: epdg_diameter_swm: Rename gen_server events to easily identify direction

2024-03-18 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36336?usp=email )

Change subject: epdg_diameter_swm: Rename gen_server events to easily identify 
direction
..

epdg_diameter_swm: Rename gen_server events to easily identify direction

This is a preparation commit towards turning Tx direction as casts
instead of calls, which will allow calling functions to transmit while
in rx path in epdg_ue_fsm.

Change-Id: I97fcd93839271ee9961dd31f335c7b1e8f0423be
---
M src/epdg_diameter_swm.erl
1 file changed, 50 insertions(+), 36 deletions(-)

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




diff --git a/src/epdg_diameter_swm.erl b/src/epdg_diameter_swm.erl
index 05fb87b..0badb28 100644
--- a/src/epdg_diameter_swm.erl
+++ b/src/epdg_diameter_swm.erl
@@ -43,7 +43,7 @@
% PdpTypeNr: SWm Diameter AVP "UE-Local-IP-Address"
% Apn: SWm Diameter AVP "Service-Selection"
% EAP: SWm Diameter AVP EAP-Payload
-   Result = gen_server:call(?SERVER, {der_auth_req, ImsiStr, PdpTypeNr, 
Apn, EAP}),
+   Result = gen_server:call(?SERVER, {tx_dia, {der_auth_req, ImsiStr, 
PdpTypeNr, Apn, EAP}}),
case Result of
{ok, _AuthTuples} ->
epdg_ue_fsm:received_swm_dea_auth_response(self(), 
Result),
@@ -54,13 +54,13 @@
 tx_reauth_answer(Imsi, DiaRC) ->
% In Diameter we use Imsi as strings, as done by diameter module.
ImsiStr = binary_to_list(Imsi),
-   _Result = gen_server:call(?SERVER, {raa, ImsiStr, DiaRC}).
+   _Result = gen_server:call(?SERVER, {tx_dia, {raa, ImsiStr, DiaRC}}).

 % Rx "GSUP CEAI LU Req" is our way of saying Rx "Swm Diameter-EAP REQ (DER) 
with EAP AVP containing successuful auth":
 tx_der_auth_compl_request(Imsi, Apn) ->
% In Diameter we use Imsi as strings, as done by diameter module.
ImsiStr = binary_to_list(Imsi),
-   Result = gen_server:call(?SERVER, {der_auth_compl_req, ImsiStr, Apn}),
+   Result = gen_server:call(?SERVER, {tx_dia, {der_auth_compl_req, 
ImsiStr, Apn}}),
case Result of
{ok, _Mar} ->

epdg_ue_fsm:received_swm_dea_auth_compl_response(self(), Result),
@@ -72,7 +72,7 @@
 tx_session_termination_request(Imsi) ->
% In Diameter we use Imsi as strings, as done by diameter module.
ImsiStr = binary_to_list(Imsi),
-   Result = gen_server:call(?SERVER, {str, ImsiStr}),
+   Result = gen_server:call(?SERVER, {tx_dia, {str, ImsiStr}}),
case Result of
{ok, _Mar} ->

epdg_ue_fsm:received_swm_session_terminate_answer(self(), Result),
@@ -84,39 +84,61 @@
 tx_abort_session_answer(Imsi) ->
% In Diameter we use Imsi as strings, as done by diameter module.
ImsiStr = binary_to_list(Imsi),
-   Result = gen_server:call(?SERVER, {asa, ImsiStr}),
+   Result = gen_server:call(?SERVER, {tx_dia, {asa, ImsiStr}}),
case Result of
{ok, _Mar} ->
ok;
_ -> Result
end.

-handle_call({der_auth_req, Imsi, PdpTypeNr, Apn, EAP}, _From, State) ->
+%% Emulation from the wire (DIAMETER SWm), called from internal AAA Server:
+rx_reauth_request(Imsi) ->
+   ok = gen_server:cast(?SERVER, {rx_dia, {rar, Imsi}}).
+
+%% Emulation from the wire (DIAMETER SWm), called from internal AAA Server:
+rx_dea_auth_response(Imsi, Result) ->
+   ok = gen_server:cast(?SERVER, {rx_dia, {dea_auth_resp, Imsi, Result}}).
+
+%Rx Swm Diameter-EAP Answer (DEA) containing APN-Configuration, triggered by
+%earlier Tx DER EAP AVP containing successuful auth":
+rx_dea_auth_compl_response(Imsi, Result) ->
+   ok = gen_server:cast(?SERVER, {rx_dia, {dea_auth_compl_resp, Imsi, 
Result}}).
+
+% Rx SWm Diameter STA:
+rx_session_termination_answer(Imsi, Result) ->
+   ok = gen_server:cast(?SERVER, {rx_dia, {sta, Imsi, Result}}).
+
+% Rx SWm Diameter ASR:
+rx_abort_session_request(Imsi) ->
+   ok = gen_server:cast(?SERVER, {rx_dia, {asr, Imsi}}).
+
+handle_call({tx_dia, {der_auth_req, Imsi, PdpTypeNr, Apn, EAP}}, _From, State) 
->
% we yet don't implement the Diameter SWm interface on the wire, we 
process the call internally:
ok = aaa_diameter_swm:rx_der_auth_request(Imsi, PdpTypeNr, Apn, EAP),
{reply, ok, State};

-handle_call({raa, Imsi, DiaRC}, _From, State) ->
+handle_call({tx_dia, {raa, Imsi, DiaRC}}, _From, State) ->
% we yet don't implement the Diameter SWm interface on the wire, we 
process the call internally:
aaa_diameter_swm:rx_reauth_answer(Imsi, DiaRC#epdg_dia_rc.result_code),
{reply, ok, State};

-handle_call({der_auth_compl_req, Imsi, Apn}, _From, State) ->
+handle_call({tx_dia, {der_auth_compl_req, Imsi, Apn}}, _From, State) ->
% we yet don't implement the Diameter SWm 

[M] Change in ...osmo-epdg[master]: Rename code paths Tx/Rx of Diameter Swm DER/DEA

2024-03-18 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36333?usp=email )

Change subject: Rename code paths Tx/Rx of Diameter Swm DER/DEA
..

Rename code paths Tx/Rx of Diameter Swm DER/DEA

Rename all related code paths related to Tx/Rx of DER and DEA messages,
so that it becomes easier to match code to spec references.

Change-Id: I4f4219ab04dce4ca7aac3a0410ac94a41080949f
---
M src/aaa_diameter_swm.erl
M src/aaa_ue_fsm.erl
M src/epdg_diameter_swm.erl
M src/epdg_ue_fsm.erl
4 files changed, 84 insertions(+), 71 deletions(-)

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




diff --git a/src/aaa_diameter_swm.erl b/src/aaa_diameter_swm.erl
index c7c87a5..fadff7e 100644
--- a/src/aaa_diameter_swm.erl
+++ b/src/aaa_diameter_swm.erl
@@ -14,13 +14,13 @@
 -export([init/1, handle_call/3, handle_cast/2, handle_info/2]).
 -export([code_change/3, terminate/2]).

--export([rx_auth_request/4,
-rx_auth_compl_request/2,
+-export([rx_der_auth_request/4,
+rx_der_auth_compl_request/2,
 rx_reauth_answer/2,
 rx_session_termination_request/1,
 rx_abort_session_answer/1]).
--export([tx_auth_response/2,
-tx_auth_compl_response/2,
+-export([tx_dea_auth_response/2,
+tx_dea_auth_compl_response/2,
 tx_reauth_request/1,
 tx_session_termination_answer/2,
 tx_as_request/1]).
@@ -38,11 +38,11 @@
 % Tx over emulated SWm wire:
 %%

-tx_auth_response(Imsi, Result) ->
-   _Result = gen_server:call(?SERVER, {epdg_auth_resp, Imsi, Result}).
+tx_dea_auth_response(Imsi, Result) ->
+   _Result = gen_server:call(?SERVER, {dea_auth_resp, Imsi, Result}).

-tx_auth_compl_response(Imsi, Result) ->
-   _Result = gen_server:call(?SERVER, {epdg_auth_compl_resp, Imsi, 
Result}).
+tx_dea_auth_compl_response(Imsi, Result) ->
+   _Result = gen_server:call(?SERVER, {dea_auth_compl_resp, Imsi, Result}).

 tx_reauth_request(Imsi) ->
_Result = gen_server:call(?SERVER, {rar, Imsi}).
@@ -56,11 +56,11 @@
 %%
 % Rx from emulated SWm wire:
 %%
-rx_auth_request(Imsi, PdpTypeNr, Apn, EAP) ->
-   gen_server:cast(?SERVER, {epdg_auth_req, Imsi, PdpTypeNr, Apn, EAP}).
+rx_der_auth_request(Imsi, PdpTypeNr, Apn, EAP) ->
+   gen_server:cast(?SERVER, {der_auth_req, Imsi, PdpTypeNr, Apn, EAP}).

-rx_auth_compl_request(Imsi, Apn) ->
-   gen_server:cast(?SERVER, {epdg_auth_compl_req, Imsi, Apn}).
+rx_der_auth_compl_request(Imsi, Apn) ->
+   gen_server:cast(?SERVER, {der_auth_compl_req, Imsi, Apn}).

 rx_reauth_answer(Imsi, Result) ->
gen_server:cast(?SERVER, {raa, Imsi, Result}).
@@ -73,21 +73,21 @@

 %% handle_cast: Rx side

-handle_cast({epdg_auth_req, Imsi, PdpTypeNr, Apn, EAP}, State) ->
+handle_cast({der_auth_req, Imsi, PdpTypeNr, Apn, EAP}, State) ->
case aaa_ue_fsm:get_pid_by_imsi(Imsi) of
undefined -> {ok, Pid} = aaa_ue_fsm:start(Imsi);
Pid -> Pid
end,
-   aaa_ue_fsm:ev_rx_swm_auth_req(Pid, {PdpTypeNr, Apn, EAP}),
+   aaa_ue_fsm:ev_rx_swm_der_auth_req(Pid, {PdpTypeNr, Apn, EAP}),
{noreply, State};

-handle_cast({epdg_auth_compl_req, Imsi, Apn}, State) ->
+handle_cast({der_auth_compl_req, Imsi, Apn}, State) ->
case aaa_ue_fsm:get_pid_by_imsi(Imsi) of
Pid when is_pid(Pid) ->
-   aaa_ue_fsm:ev_rx_swm_auth_compl(Pid, Apn);
+   aaa_ue_fsm:ev_rx_swm_der_auth_compl(Pid, Apn);
undefined ->
RC_USER_UNKNOWN=5030,
-   epdg_diameter_swm:rx_auth_compl_response(Imsi, {error, 
RC_USER_UNKNOWN})
+   epdg_diameter_swm:rx_dea_auth_compl_response(Imsi, {error, 
RC_USER_UNKNOWN})
end,
{noreply, State};

@@ -133,12 +133,12 @@
{noreply, S}.

 %% handle_call: Tx side
-handle_call({epdg_auth_resp, Imsi, Result}, _From, State) ->
-   epdg_diameter_swm:rx_auth_response(Imsi, Result),
+handle_call({dea_auth_resp, Imsi, Result}, _From, State) ->
+   epdg_diameter_swm:rx_dea_auth_response(Imsi, Result),
{reply, ok, State};

-handle_call({epdg_auth_compl_resp, Imsi, Result}, _From, State) ->
-   epdg_diameter_swm:rx_auth_compl_response(Imsi, Result),
+handle_call({dea_auth_compl_resp, Imsi, Result}, _From, State) ->
+   epdg_diameter_swm:rx_dea_auth_compl_response(Imsi, Result),
{reply, ok, State};

 handle_call({rar, Imsi}, _From, State) ->
diff --git a/src/aaa_ue_fsm.erl b/src/aaa_ue_fsm.erl
index d2e4aad..abbe40e 100644
--- a/src/aaa_ue_fsm.erl
+++ b/src/aaa_ue_fsm.erl
@@ -42,7 +42,8 @@
 -export([start/1, stop/1]).
 -export([init/1,callback_mode/0,terminate/3]).
 -export([get_server_name_by_imsi/1, get_pid_by_imsi/1]).
--export([ev_rx_swm_auth_req/2, ev_rx_swm_reauth_answer/2, 
ev_rx_swm_auth_compl/2, ev_rx_swm_str/1, ev_rx_swm_asa/1,

[M] Change in ...osmo-epdg[master]: epdg_diameter_swm: Convert Tx calls to casts

2024-03-18 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36337?usp=email )

Change subject: epdg_diameter_swm: Convert Tx calls to casts
..

epdg_diameter_swm: Convert Tx calls to casts

This allows calling Tx function from within Rx paths in epdg_ue_fsm.

Change-Id: Id42ba265ffde735c0a68a4d11ef2dad56cfd
---
M src/epdg_diameter_swm.erl
M src/epdg_ue_fsm.erl
2 files changed, 63 insertions(+), 68 deletions(-)

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




diff --git a/src/epdg_diameter_swm.erl b/src/epdg_diameter_swm.erl
index 0badb28..bf7c0b1 100644
--- a/src/epdg_diameter_swm.erl
+++ b/src/epdg_diameter_swm.erl
@@ -43,53 +43,30 @@
% PdpTypeNr: SWm Diameter AVP "UE-Local-IP-Address"
% Apn: SWm Diameter AVP "Service-Selection"
% EAP: SWm Diameter AVP EAP-Payload
-   Result = gen_server:call(?SERVER, {tx_dia, {der_auth_req, ImsiStr, 
PdpTypeNr, Apn, EAP}}),
-   case Result of
-   {ok, _AuthTuples} ->
-   epdg_ue_fsm:received_swm_dea_auth_response(self(), 
Result),
-   ok;
-   _ -> Result
-   end.
+   ok = gen_server:cast(?SERVER, {tx_dia, {der_auth_req, ImsiStr, 
PdpTypeNr, Apn, EAP}}).

 tx_reauth_answer(Imsi, DiaRC) ->
% In Diameter we use Imsi as strings, as done by diameter module.
ImsiStr = binary_to_list(Imsi),
-   _Result = gen_server:call(?SERVER, {tx_dia, {raa, ImsiStr, DiaRC}}).
+   ok = gen_server:cast(?SERVER, {tx_dia, {raa, ImsiStr, DiaRC}}).

 % Rx "GSUP CEAI LU Req" is our way of saying Rx "Swm Diameter-EAP REQ (DER) 
with EAP AVP containing successuful auth":
 tx_der_auth_compl_request(Imsi, Apn) ->
% In Diameter we use Imsi as strings, as done by diameter module.
ImsiStr = binary_to_list(Imsi),
-   Result = gen_server:call(?SERVER, {tx_dia, {der_auth_compl_req, 
ImsiStr, Apn}}),
-   case Result of
-   {ok, _Mar} ->
-   
epdg_ue_fsm:received_swm_dea_auth_compl_response(self(), Result),
-   ok;
-   _ -> Result
-   end.
+   ok = gen_server:cast(?SERVER, {tx_dia, {der_auth_compl_req, ImsiStr, 
Apn}}).

 % 3GPP TS 29.273 7.1.2.3
 tx_session_termination_request(Imsi) ->
% In Diameter we use Imsi as strings, as done by diameter module.
ImsiStr = binary_to_list(Imsi),
-   Result = gen_server:call(?SERVER, {tx_dia, {str, ImsiStr}}),
-   case Result of
-   {ok, _Mar} ->
-   
epdg_ue_fsm:received_swm_session_terminate_answer(self(), Result),
-   ok;
-   _ -> Result
-   end.
+   ok = gen_server:cast(?SERVER, {tx_dia, {str, ImsiStr}}).

 % 3GPP TS 29.273 7.1.2.4
 tx_abort_session_answer(Imsi) ->
% In Diameter we use Imsi as strings, as done by diameter module.
ImsiStr = binary_to_list(Imsi),
-   Result = gen_server:call(?SERVER, {tx_dia, {asa, ImsiStr}}),
-   case Result of
-   {ok, _Mar} ->
-   ok;
-   _ -> Result
-   end.
+   ok = gen_server:cast(?SERVER, {tx_dia, {asa, ImsiStr}}).

 %% Emulation from the wire (DIAMETER SWm), called from internal AAA Server:
 rx_reauth_request(Imsi) ->
@@ -112,31 +89,39 @@
 rx_abort_session_request(Imsi) ->
ok = gen_server:cast(?SERVER, {rx_dia, {asr, Imsi}}).

-handle_call({tx_dia, {der_auth_req, Imsi, PdpTypeNr, Apn, EAP}}, _From, State) 
->
-   % we yet don't implement the Diameter SWm interface on the wire, we 
process the call internally:
-   ok = aaa_diameter_swm:rx_der_auth_request(Imsi, PdpTypeNr, Apn, EAP),
-   {reply, ok, State};

-handle_call({tx_dia, {raa, Imsi, DiaRC}}, _From, State) ->
+%% --
+%% Internal Function Definitions
+%% --
+
+handle_call(Request, From, State) ->
+   error_logger:error_report(["unknown handle_call", {module, ?MODULE}, 
{request, Request}, {from, From}, {state, State}]),
+   {reply, ok, State}.
+
+handle_cast({tx_dia, {der_auth_req, Imsi, PdpTypeNr, Apn, EAP}}, State) ->
+   % we yet don't implement the Diameter SWm interface on the wire, we 
process the call internally:
+   aaa_diameter_swm:rx_der_auth_request(Imsi, PdpTypeNr, Apn, EAP),
+   {noreply, State};
+
+handle_cast({tx_dia, {raa, Imsi, DiaRC}}, State) ->
% we yet don't implement the Diameter SWm interface on the wire, we 
process the call internally:
aaa_diameter_swm:rx_reauth_answer(Imsi, DiaRC#epdg_dia_rc.result_code),
-   {reply, ok, State};
+   {noreply, State};

-handle_call({tx_dia, {der_auth_compl_req, Imsi, Apn}}, _From, State) ->
+handle_cast({tx_dia, {der_auth_compl_req, Imsi, Apn}}, State) ->
% we yet don't implement the Diameter SWm interface 

[M] Change in ...osmo-epdg[master]: epdg_diameter_swm: Look up epdg_ue_fsm process each time it needs to ...

2024-03-18 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36332?usp=email )

Change subject: epdg_diameter_swm: Look up epdg_ue_fsm process each time it 
needs to be accessed
..

epdg_diameter_swm: Look up epdg_ue_fsm process each time it needs to be accessed

This allows simplifying a lot the module state, similar to what was
already done in other modules.

Change-Id: Iacdba6570bfa286d03542733911b01e3a16e9706
---
M src/epdg_diameter_swm.erl
1 file changed, 45 insertions(+), 92 deletions(-)

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




diff --git a/src/epdg_diameter_swm.erl b/src/epdg_diameter_swm.erl
index c479b44..5d7ffe2 100644
--- a/src/epdg_diameter_swm.erl
+++ b/src/epdg_diameter_swm.erl
@@ -8,14 +8,8 @@
 -include("conv.hrl").

 -record(swm_state, {
-   sessions = sets:new()
 }).

--record(swm_session, {
-   imsi   :: string(),
-   pid:: pid()
-}).
-
 -export([start_link/0]).
 -export([init/1, handle_call/3, handle_cast/2, handle_info/2]).
 -export([code_change/3, terminate/2]).
@@ -97,11 +91,10 @@
_ -> Result
end.

-handle_call({epdg_auth_req, Imsi, PdpTypeNr, Apn, EAP}, {Pid, _Tag} = _From, 
State0) ->
+handle_call({epdg_auth_req, Imsi, PdpTypeNr, Apn, EAP}, _From, State) ->
% we yet don't implement the Diameter SWm interface on the wire, we 
process the call internally:
-   {_Sess, State1} = find_or_new_swm_session(Imsi, Pid, State0),
ok = aaa_diameter_swm:rx_auth_request(Imsi, PdpTypeNr, Apn, EAP),
-   {reply, ok, State1};
+   {reply, ok, State};

 handle_call({raa, Imsi, DiaRC}, _From, State) ->
% we yet don't implement the Diameter SWm interface on the wire, we 
process the call internally:
@@ -110,91 +103,73 @@

 handle_call({epdg_auth_compl_req, Imsi, Apn}, _From, State) ->
% we yet don't implement the Diameter SWm interface on the wire, we 
process the call internally:
-   Sess = find_swm_session_by_imsi(Imsi, State),
-   case Sess of
-   #swm_session{imsi = Imsi} ->
-   Reply = aaa_diameter_swm:rx_auth_compl_request(Imsi, Apn);
-   undefined ->
-   Reply = {error,unknown_imsi}
-   end,
+   Reply = aaa_diameter_swm:rx_auth_compl_request(Imsi, Apn),
{reply, Reply, State};

 handle_call({str, Imsi}, _From, State) ->
% we yet don't implement the Diameter SWm interface on the wire, we 
process the call internally:
-   Sess = find_swm_session_by_imsi(Imsi, State),
-   case Sess of
-   #swm_session{imsi = Imsi} ->
-   Reply = aaa_diameter_swm:rx_session_termination_request(Imsi);
-   undefined ->
-   Reply = {error,unknown_imsi}
-   end,
+   Reply = aaa_diameter_swm:rx_session_termination_request(Imsi),
{reply, Reply, State};

 handle_call({asa, Imsi}, _From, State) ->
% we yet don't implement the Diameter SWm interface on the wire, we 
process the call internally:
-   Sess = find_swm_session_by_imsi(Imsi, State),
-   case Sess of
-   #swm_session{imsi = Imsi} ->
-   Reply = aaa_diameter_swm:rx_abort_session_answer(Imsi);
-   undefined ->
-   Reply = {error,unknown_imsi}
-   end,
+   Reply = aaa_diameter_swm:rx_abort_session_answer(Imsi),
{reply, Reply, State}.

-handle_cast({epdg_auth_resp, Imsi, Result}, State) ->
-   Sess = find_swm_session_by_imsi(Imsi, State),
-   case Sess of
-   #swm_session{imsi = Imsi} ->
-   epdg_ue_fsm:received_swm_auth_response(Sess#swm_session.pid, 
Result);
+handle_cast({epdg_auth_resp, ImsiStr, Result}, State) ->
+   Imsi = list_to_binary(ImsiStr),
+   case epdg_ue_fsm:get_pid_by_imsi(Imsi) of
+   Pid when is_pid(Pid) ->
+   epdg_ue_fsm:received_swm_auth_response(Pid, Result);
undefined ->
error_logger:error_report(["unknown swm_session", {module, 
?MODULE}, {imsi, Imsi}, {state, State}])
end,
{noreply, State};

-handle_cast({epdg_auth_compl_resp, Imsi, Result}, State) ->
-   Sess = find_swm_session_by_imsi(Imsi, State),
-   case Sess of
-   #swm_session{imsi = Imsi} ->
-   
epdg_ue_fsm:received_swm_auth_compl_response(Sess#swm_session.pid, Result);
+handle_cast({epdg_auth_compl_resp, ImsiStr, Result}, State) ->
+   Imsi = list_to_binary(ImsiStr),
+   case epdg_ue_fsm:get_pid_by_imsi(Imsi) of
+   Pid when is_pid(Pid) ->
+   epdg_ue_fsm:received_swm_auth_compl_response(Pid, Result);
undefined ->
error_logger:error_report(["unknown swm_session", {module, 
?MODULE}, {imsi, Imsi}, {state, State}])
end,
{noreply, State};

-handle_cast({rar, Imsi}, State) ->
-   Sess = find_swm_session_by_imsi(Imsi, State),
-   case Sess of
-   #swm_session{imsi = Imsi} ->
-

[S] Change in ...osmo-epdg[master]: epdg_ue_fsm: Properly define type of field in record

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

Change subject: epdg_ue_fsm: Properly define type of field in record
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36341?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: I0d1c91be2fadbcfecef8ca5aaf6df07b98a834f2
Gerrit-Change-Number: 36341
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Mon, 18 Mar 2024 17:28:44 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in ...osmo-epdg[master]: epdg: Trigger AAR+AAA upon rx of RAR

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

Change subject: epdg: Trigger AAR+AAA upon rx of RAR
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36340?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: I478b781e65eb5dd0cce5b51c75a1aa592b6555bc
Gerrit-Change-Number: 36340
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Mon, 18 Mar 2024 17:28:42 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in ...osmo-epdg[master]: epdg_diameter_swm: Rename gen_server events to easily identify direction

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

Change subject: epdg_diameter_swm: Rename gen_server events to easily identify 
direction
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36336?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: I97fcd93839271ee9961dd31f335c7b1e8f0423be
Gerrit-Change-Number: 36336
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Mon, 18 Mar 2024 17:28:37 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in ...osmo-epdg[master]: epdg: Tx SWm RAA from within epdg_ue_fsm

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

Change subject: epdg: Tx SWm RAA from within epdg_ue_fsm
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36339?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: Ib31cf1ab4c7e10c910e54b9908b62eee26ee3cba
Gerrit-Change-Number: 36339
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Mon, 18 Mar 2024 17:28:40 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in ...osmo-epdg[master]: epdg_diameter_swm: Convert Tx calls to casts

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

Change subject: epdg_diameter_swm: Convert Tx calls to casts
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36337?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: Id42ba265ffde735c0a68a4d11ef2dad56cfd
Gerrit-Change-Number: 36337
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Mon, 18 Mar 2024 17:28:38 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in ...osmo-epdg[master]: Rename code paths Tx/Rx of Diameter Swm DER/DEA

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

Change subject: Rename code paths Tx/Rx of Diameter Swm DER/DEA
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36333?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: I4f4219ab04dce4ca7aac3a0410ac94a41080949f
Gerrit-Change-Number: 36333
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Mon, 18 Mar 2024 17:28:35 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in ...osmo-epdg[master]: epdg_diameter_swm: Look up epdg_ue_fsm process each time it needs to ...

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

Change subject: epdg_diameter_swm: Look up epdg_ue_fsm process each time it 
needs to be accessed
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36332?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: Iacdba6570bfa286d03542733911b01e3a16e9706
Gerrit-Change-Number: 36332
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Mon, 18 Mar 2024 17:28:33 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in libosmo-abis[master]: e1line_dump_vty(): dump keepalive state and params

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

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

Change subject: e1line_dump_vty(): dump keepalive state and params
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/36342?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: I17bd991850333ee794ab216f474b5e045fb01fa3
Gerrit-Change-Number: 36342
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Mon, 18 Mar 2024 17:24:58 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in ...osmo-epdg[master]: epdg_diameter_swm: Rename gen_server events to easily identify direction

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

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

Change subject: epdg_diameter_swm: Rename gen_server events to easily identify 
direction
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36336?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: I97fcd93839271ee9961dd31f335c7b1e8f0423be
Gerrit-Change-Number: 36336
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Mon, 18 Mar 2024 16:54:21 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in libosmo-abis[master]: e1line_dump_vty(): dump keepalive state and params

2024-03-18 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-abis/+/36342?usp=email )


Change subject: e1line_dump_vty(): dump keepalive state and params
..

e1line_dump_vty(): dump keepalive state and params

There is currently no obvious way to know if the keepalive is enabled
and which parameters are in use.  Executing 'show running-config'
command in the VTY would not always reveal the current configuration,
because it tends to omit parameters with default values.

Let's print the keepalive state and params in the output of the
'show e1_line' command.  Below is a few examples:

! keepalive is disabled
OsmoBSC# show e1_line
E1 Line Number 0, Name , Driver ipa
Keepalive: disabled
IPA Keepalive: disabled

! TCP Keepalive is enabled (default)
OsmoBSC# show e1_line
E1 Line Number 0, Name , Driver ipa
Keepalive: enabled
  Number of probes: (driver's default)
  Idle timeout: (driver's default)
  Probe interval: (driver's default)
IPA Keepalive: disabled

! TCP and IPA keepalive enabled (custom params)
OsmoBSC# show e1_line
E1 Line Number 0, Name , Driver ipa
Keepalive: enabled
  Number of probes: 2
  Idle timeout: 1s
  Probe interval: 3s
IPA Keepalive: enabled
  Interval: 2s
  Timeout: 10s

Note that in the case of TCP keepalive with default parameters
we cannot retrieve the actual defaults because that would be a
layering violation.  Thus we say "(driver's default)".

Change-Id: I17bd991850333ee794ab216f474b5e045fb01fa3
Related: OS#6375, SYS#6801
---
M src/e1_input_vty.c
1 file changed, 95 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/42/36342/1

diff --git a/src/e1_input_vty.c b/src/e1_input_vty.c
index ca45f93..b1898dd 100644
--- a/src/e1_input_vty.c
+++ b/src/e1_input_vty.c
@@ -457,12 +457,59 @@
return CMD_SUCCESS;
 }

+static void e1line_ka_dump_vty(struct vty *vty, const struct e1inp_line *line)
+{
+   if (line->keepalive_num_probes == 0) {
+   vty_out(vty, "Keepalive: disabled%s", VTY_NEWLINE);
+   return;
+   }
+
+   vty_out(vty, "Keepalive: enabled%s", VTY_NEWLINE);
+
+   vty_out(vty, "  Number of probes: ");
+   if (line->keepalive_num_probes != E1INP_USE_DEFAULT)
+   vty_out(vty, "%d", line->keepalive_num_probes);
+   else
+   vty_out(vty, "(driver's default)");
+   vty_out(vty, "%s", VTY_NEWLINE);
+
+   vty_out(vty, "  Idle timeout: ");
+   if (line->keepalive_idle_timeout != E1INP_USE_DEFAULT)
+   vty_out(vty, "%ds", line->keepalive_idle_timeout);
+   else
+   vty_out(vty, "(driver's default)");
+   vty_out(vty, "%s", VTY_NEWLINE);
+
+   vty_out(vty, "  Probe interval: ");
+   if (line->keepalive_probe_interval != E1INP_USE_DEFAULT)
+   vty_out(vty, "%ds", line->keepalive_probe_interval);
+   else
+   vty_out(vty, "(driver's default)");
+   vty_out(vty, "%s", VTY_NEWLINE);
+}
+
+static void e1line_ipa_ka_dump_vty(struct vty *vty, const struct e1inp_line 
*line)
+{
+   if (line->ipa_kap == NULL) {
+   vty_out(vty, "IPA Keepalive: disabled%s", VTY_NEWLINE);
+   return;
+   }
+
+   vty_out(vty, "IPA Keepalive: enabled%s", VTY_NEWLINE);
+   vty_out(vty, "  Interval: %us%s", line->ipa_kap->interval, VTY_NEWLINE);
+   vty_out(vty, "  Timeout: %us%s", line->ipa_kap->wait_for_resp, 
VTY_NEWLINE);
+}
+
 static void e1line_dump_vty(struct vty *vty, struct e1inp_line *line,
int stats)
 {
vty_out(vty, "E1 Line Number %u, Name %s, Driver %s%s",
line->num, line->name ? line->name : "",
line->driver->name, VTY_NEWLINE);
+   if (line->driver->has_keepalive)
+   e1line_ka_dump_vty(vty, line);
+   if (!strcmp(line->driver->name, "ipa"))
+   e1line_ipa_ka_dump_vty(vty, line);
if (line->pcap_file)
vty_out(vty, "PCAP %s%s", line->pcap_file, VTY_NEWLINE);
if (line->driver->vty_show)

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


[S] Change in libosmocore[master]: msgb: Also copy msgb {dst, lchan, cb} during msgb_copy_*

2024-03-18 Thread dexter
Attention is currently required from: laforge.

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

Change subject: msgb: Also copy msgb {dst, lchan, cb} during msgb_copy_*
..


Patch Set 1: Code-Review+1

(1 comment)

File src/core/msgb.c:

https://gerrit.osmocom.org/c/libosmocore/+/36324/comment/8f67c267_3d95cea1
PS1, Line 320:  *  and adjusts the pointers (incl l1h-l4h) accordingly. The cb 
part is not copied.
Now it is copied.



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36324?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: I68328adb952ca8833ba047cb3b49ccc6f8a1f1b5
Gerrit-Change-Number: 36324
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Mon, 18 Mar 2024 16:46:14 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in ...osmo-epdg[master]: epdg_ue_fsm: Properly define type of field in record

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

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

Change subject: epdg_ue_fsm: Properly define type of field in record
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36341?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: I0d1c91be2fadbcfecef8ca5aaf6df07b98a834f2
Gerrit-Change-Number: 36341
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Mon, 18 Mar 2024 16:43:17 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-ttcn3-hacks[master]: bts: also test TCH/A[FH]S in TC_speech_no_rtp_tch[fh]

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

Change subject: bts: also test TCH/A[FH]S in TC_speech_no_rtp_tch[fh]
..

bts: also test TCH/A[FH]S in TC_speech_no_rtp_tch[fh]

Change-Id: I3c7f91034079169c40c4f20966d9f5fb7c855b27
Related: OS#4823, OS#6049
---
M bts/BTS_Tests.ttcn
1 file changed, 20 insertions(+), 4 deletions(-)

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




diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 0103bbc..29879b9 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -8323,8 +8323,11 @@
vc_conn := f_start_handler(refers(f_TC_speech_no_rtp), pars);
vc_conn.done;

-   /* TODO: we don't know what's the expected behavior for TCH/AFS, so we 
don't test it here.
-* Current osmo-bts is sending FACCH/F with dummy LAPDm func=UI frames. 
*/
+   /* TS1, TCH/F, V3 (AMR codec) */
+   pars := valueof(t_Pars(ts_RslChanNr_Bm(1), 
ts_RSL_ChanMode(RSL_CHRT_TCH_F, RSL_CMOD_SP_GSM3)));
+   pars.mr_conf := valueof(ts_RSL_MultirateCfg);
+   vc_conn := f_start_handler(refers(f_TC_speech_no_rtp), pars);
+   vc_conn.done;

Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
 }
@@ -8339,8 +8342,11 @@
vc_conn := f_start_handler(refers(f_TC_speech_no_rtp), pars);
vc_conn.done;

-   /* TODO: we don't know what's the expected behavior for TCH/AHS, so we 
don't test it here.
-* Current osmo-bts is sending FACCH/H with dummy LAPDm func=UI frames 
(whenever possible). */
+   /* TS5, TCH/H, V3 (AMR codec) */
+   pars := valueof(t_Pars(ts_RslChanNr_Lm(5, 0), 
ts_RSL_ChanMode(RSL_CHRT_TCH_H, RSL_CMOD_SP_GSM3)));
+   pars.mr_conf := valueof(ts_RSL_MultirateCfg);
+   vc_conn := f_start_handler(refers(f_TC_speech_no_rtp), pars);
+   vc_conn.done;

Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
 }

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


[S] Change in osmo-ttcn3-hacks[master]: bts: dequeue L1CTL {DATA,TRAFFIC}.cnf in as_l1_{sacch,dcch,tcp}_loop()

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

Change subject: bts: dequeue L1CTL {DATA,TRAFFIC}.cnf in 
as_l1_{sacch,dcch,tcp}_loop()
..

bts: dequeue L1CTL {DATA,TRAFFIC}.cnf in as_l1_{sacch,dcch,tcp}_loop()

This fixes sporadic failures in testcases using those altsteps.

Change-Id: I3538d40ff1a585ccbe37f3a90f3c374c5f0b5767
Related: osmocom-bb.git I0046f9c103bcb9207f0c2643c6a806bd56553d77
---
M bts/BTS_Tests.ttcn
1 file changed, 18 insertions(+), 0 deletions(-)

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




diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 05a3349..0103bbc 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -2190,6 +2190,8 @@
L1CTL.send(ts_L1CTL_DATA_REQ_SACCH(g_chan_nr, 
ts_RslLinkID_SACCH(0), l1h, l2));
repeat;
}
+   /* dequeue (ignore) L1CTL DATA.cnf for UL SACCH (SAPI=0) */
+   [] L1CTL.receive(tr_L1CTL_DATA_CONF(g_chan_nr, tr_RslLinkID_SACCH(0))) 
{ repeat; }
 }

 /* handle incoming downlink SACCH, decode the L1 header into the given record 
*/
@@ -2220,6 +,8 @@
f_pad_oct(pl, 23, '2B'O)));
repeat;
}
+   /* dequeue (ignore) L1CTL DATA.cnf for UL DCCH (SAPI=0) */
+   [] L1CTL.receive(tr_L1CTL_DATA_CONF(g_chan_nr, tr_RslLinkID_DCCH(0))) { 
repeat; }
 }

 private altstep as_l1_tch_loop() runs on ConnHdlr {
@@ -2240,6 +2244,8 @@

repeat;
}
+   /* dequeue (ignore) L1CTL TRAFFIC.cnf for UL TCH */
+   [] L1CTL.receive(tr_L1CTL_TRAFFIC_CONF(g_chan_nr, 
tr_RslLinkID_DCCH(0))) { repeat; }
 }

 private type record MeasElem {

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


[M] Change in osmo-ttcn3-hacks[master]: library: add templates for L1CTL_{DATA,TRAFFIC}_CONF

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

Change subject: library: add templates for L1CTL_{DATA,TRAFFIC}_CONF
..

library: add templates for L1CTL_{DATA,TRAFFIC}_CONF

Change-Id: I914555ac8bf2784c14e1b5564b116221ecc7b539
---
M library/L1CTL_Types.ttcn
1 file changed, 67 insertions(+), 0 deletions(-)

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




diff --git a/library/L1CTL_Types.ttcn b/library/L1CTL_Types.ttcn
index 7571b4f..b977a7d 100644
--- a/library/L1CTL_Types.ttcn
+++ b/library/L1CTL_Types.ttcn
@@ -836,6 +836,64 @@
}
};

+   /* for sending and matching L1CTL_DATA_CONF */
+   template (value) L1ctlMessage
+   ts_L1CTL_DATA_CONF(template (value) RslChannelNr chan_nr,
+  template (value) RslLinkId link_id,
+  template (value) GsmBandArfcn arfcn,
+  template (value) GsmFrameNumber fn) := {
+   header := ts_L1ctlHeader(L1CTL_DATA_CONF),
+   ul_info := omit,
+   dl_info := {
+   chan_nr := chan_nr,
+   link_id := link_id,
+   arfcn := arfcn,
+   frame_nr := fn,
+   rx_level := 0,
+   snr := 0,
+   num_biterr := 0,
+   fire_crc := 0
+   },
+   payload := omit
+   };
+   template L1ctlMessage
+   tr_L1CTL_DATA_CONF(template (present) RslChannelNr chan_nr,
+  template (present) RslLinkId link_id := ?,
+  template (present) GsmBandArfcn arfcn := ?,
+  template (present) GsmFrameNumber fn := ?) := {
+   header := tr_L1ctlHeader(L1CTL_DATA_CONF),
+   ul_info := omit,
+   dl_info := {
+   chan_nr := chan_nr,
+   link_id := link_id,
+   arfcn := arfcn,
+   frame_nr := fn,
+   rx_level := ?,
+   snr := ?,
+   num_biterr := ?,
+   fire_crc := ?
+   },
+   payload := omit
+   };
+
+   /* for sending and matching L1CTL_TRAFFIC_CONF */
+   template (value) L1ctlMessage
+   ts_L1CTL_TRAFFIC_CONF(template (value) RslChannelNr chan_nr,
+ template (value) RslLinkId link_id,
+ template (value) GsmBandArfcn arfcn,
+ template (value) GsmFrameNumber fn)
+   modifies ts_L1CTL_DATA_CONF := {
+   header := ts_L1ctlHeader(L1CTL_TRAFFIC_CONF)
+   };
+   template L1ctlMessage
+   tr_L1CTL_TRAFFIC_CONF(template (present) RslChannelNr chan_nr,
+ template (present) RslLinkId link_id := ?,
+ template (present) GsmBandArfcn arfcn := ?,
+ template (present) GsmFrameNumber fn := ?)
+   modifies tr_L1CTL_DATA_CONF := {
+   header := tr_L1ctlHeader(L1CTL_TRAFFIC_CONF)
+   };
+
/* for matching against incoming TRAFFIC_IND */
template L1ctlMessage
tr_L1CTL_TRAFFIC_IND(template (present) RslChannelNr chan_nr,

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


[S] Change in osmo-ttcn3-hacks[master]: bts: rename as_l1_sacch() -> as_l1_sacch_loop()

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

Change subject: bts: rename as_l1_sacch() -> as_l1_sacch_loop()
..

bts: rename as_l1_sacch() -> as_l1_sacch_loop()

For the sake of consistency with as_l1_{dcch,tch}_loop().

Change-Id: I076efac80ae08551c1098a6baa15a2ca99213ee2
---
M bts/BTS_Tests.ttcn
1 file changed, 21 insertions(+), 10 deletions(-)

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




diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index cf8e7ed..05a3349 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -781,7 +781,7 @@
[] T.timeout {
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Timeout 
expecting " & id);
}
-   [not ignore_other] as_l1_sacch();
+   [not ignore_other] as_l1_sacch_loop();
[not ignore_other] as_meas_res();
[not ignore_other] as_l1_dcch_loop();
[not ignore_other] as_l1_tch_loop();
@@ -2166,7 +2166,7 @@
 }

 /* handle incoming downlink SACCH and respond with uplink SACCH (meas res) */
-private altstep as_l1_sacch() runs on ConnHdlr {
+private altstep as_l1_sacch_loop() runs on ConnHdlr {
var template (value) LapdmFrameAB lb;
var L1ctlMessage l1_dl;

@@ -2741,7 +2741,7 @@
timer T := 8.0;
T.start;
alt {
-   [] as_l1_sacch();
+   [] as_l1_sacch_loop();
[] as_meas_res();
[] as_l1_dcch_loop();
[] as_l1_tch_loop();
@@ -3039,7 +3039,7 @@
T.start;
var RSL_Message rsl;
alt {
-   [] as_l1_sacch();
+   [] as_l1_sacch_loop();
[] L1CTL.receive { repeat; }
[] RSL.receive(tr_RSL_MEAS_RES(g_chan_nr, ?, ?, ?)) -> value rsl {
if (rsl.ies[3].body.bs_power.power_level == level) {
@@ -8290,7 +8290,7 @@
[] L1CTL.receive(tr_L1CTL_TRAFFIC_IND(g_chan_nr)) -> value l1_dl {
setverdict(fail, "Rx unexpected TRAFFIC.ind: ", l1_dl);
}
-   [] as_l1_sacch();
+   [] as_l1_sacch_loop();
[] T.timeout {
setverdict(fail, "Timeout waiting for TRAFFIC.ind");
}
@@ -8404,7 +8404,7 @@
   "expected (", payload, ")");
Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
}
-   [] as_l1_sacch();
+   [] as_l1_sacch_loop();
[] L1CTL.receive { repeat; }
[] Td.timeout {
setverdict(fail, "Timeout waiting for Downlink speech frames");
@@ -8417,7 +8417,7 @@
Tu.start(2.0);
alt {
[] as_l1_tch_loop();
-   [] as_l1_sacch();
+   [] as_l1_sacch_loop();
[] RTPEM_DATA.receive(PDU_RTP:?) -> value rtp_pdu {
if (rtp_pdu.data != payload)
{ repeat; }
@@ -8522,7 +8522,7 @@
   "expected (", exp_rtp_pl, ")");
Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
}
-   [] as_l1_sacch();
+   [] as_l1_sacch_loop();
[] L1CTL.receive { repeat; }
[] Td.timeout {
setverdict(fail, "Timeout waiting for Downlink speech frames");
@@ -8538,7 +8538,7 @@
Tu.start(2.0);
alt {
[] as_l1_tch_loop();
-   [] as_l1_sacch();
+   [] as_l1_sacch_loop();
[] OsmuxEM_DATA.receive(osmux_pdu_exp) -> value osmux_pdu {
var boolean matched := false;
for (var integer i := 0; i < osmux_pdu.osmux_amr.header.ctr + 
1; i := i + 1) {
@@ -8659,7 +8659,7 @@
log("FACCH received: ", ddata);
repeat;
}
-   [] as_l1_sacch();
+   [] as_l1_sacch_loop();
[] L1CTL.receive { repeat; }
[] Td.timeout {
setverdict(fail, "Timeout waiting for matching Downlink data 
frame");

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


[M] Change in osmo-ttcn3-hacks[master]: library: add templates for L1CTL_{DATA,TRAFFIC}_CONF

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

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

Change subject: library: add templates for L1CTL_{DATA,TRAFFIC}_CONF
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36254?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: I914555ac8bf2784c14e1b5564b116221ecc7b539
Gerrit-Change-Number: 36254
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Mon, 18 Mar 2024 16:41:12 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-ttcn3-hacks[master]: bts: dequeue L1CTL {DATA,TRAFFIC}.cnf in as_l1_{sacch,dcch,tcp}_loop()

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

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

Change subject: bts: dequeue L1CTL {DATA,TRAFFIC}.cnf in 
as_l1_{sacch,dcch,tcp}_loop()
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36256?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: I3538d40ff1a585ccbe37f3a90f3c374c5f0b5767
Gerrit-Change-Number: 36256
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Mon, 18 Mar 2024 16:39:01 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-bts[master]: common: Add RTP related rate counters

2024-03-18 Thread fixeria
Attention is currently required from: laforge.

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

Change subject: common: Add RTP related rate counters
..


Patch Set 2: Code-Review+2

(1 comment)

File src/common/bts.c:

https://gerrit.osmocom.org/c/osmo-bts/+/36323/comment/9061c0e0_49e21f9f
PS1, Line 110: received
> I don't see anything wrong with the language, sorry. […]
Makes sense, marking as resolved.



--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/36323?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: Ide674bde10b0e4b501d6a48947b983090342dfec
Gerrit-Change-Number: 36323
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Mon, 18 Mar 2024 16:38:52 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: laforge 
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


[S] Change in osmo-ttcn3-hacks[master]: bts: rename as_l1_sacch() -> as_l1_sacch_loop()

2024-03-18 Thread osmith
Attention is currently required from: fixeria.

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

Change subject: bts: rename as_l1_sacch() -> as_l1_sacch_loop()
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36255?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: I076efac80ae08551c1098a6baa15a2ca99213ee2
Gerrit-Change-Number: 36255
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Mon, 18 Mar 2024 16:38:04 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-ttcn3-hacks[master]: library: add templates for L1CTL_{DATA,TRAFFIC}_CONF

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

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

Change subject: library: add templates for L1CTL_{DATA,TRAFFIC}_CONF
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36254?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: I914555ac8bf2784c14e1b5564b116221ecc7b539
Gerrit-Change-Number: 36254
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Mon, 18 Mar 2024 16:37:46 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-ttcn3-hacks[master]: bts: also test TCH/A[FH]S in TC_speech_no_rtp_tch[fh]

2024-03-18 Thread osmith
Attention is currently required from: fixeria, laforge.

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

Change subject: bts: also test TCH/A[FH]S in TC_speech_no_rtp_tch[fh]
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36257?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: I3c7f91034079169c40c4f20966d9f5fb7c855b27
Gerrit-Change-Number: 36257
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Mon, 18 Mar 2024 16:35:49 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: contrib/jenkins: add --with-bladerf

2024-03-18 Thread osmith
osmith has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36331?usp=email )

 (

2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted 
one.
 )Change subject: contrib/jenkins: add --with-bladerf
..

contrib/jenkins: add --with-bladerf

Related: OS#6409
Depends: docker-playground I3c3fe95d8ebb21f7691a491144885c7deb8049a5
Change-Id: I1300aa107fd1031cf921fafc3566f0f64f9cdd72
---
M contrib/jenkins.sh
1 file changed, 12 insertions(+), 0 deletions(-)

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




diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index f896b86..73d3ffd 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -88,6 +88,7 @@
 CONFIG="
--enable-sanitize
--enable-werror
+   --with-bladerf
--with-ipc
--with-lms
--with-mstrx

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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I1300aa107fd1031cf921fafc3566f0f64f9cdd72
Gerrit-Change-Number: 36331
Gerrit-PatchSet: 4
Gerrit-Owner: osmith 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-MessageType: merged


[S] Change in osmo-trx[master]: ms: fix up template deduction failure

2024-03-18 Thread osmith
osmith has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36338?usp=email )

Change subject: ms: fix up template deduction failure
..

ms: fix up template deduction failure

clang and gcc disagree, so just use a real var with the right type.

Change-Id: I590060d201445ad25cf5eb73c4b1360eaf6a6cea
---
M Transceiver52M/ms/bladerf_specific.h
1 file changed, 13 insertions(+), 1 deletion(-)

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




diff --git a/Transceiver52M/ms/bladerf_specific.h 
b/Transceiver52M/ms/bladerf_specific.h
index f4abe57..9db8bf0 100644
--- a/Transceiver52M/ms/bladerf_specific.h
+++ b/Transceiver52M/ms/bladerf_specific.h
@@ -269,7 +269,8 @@

bool is_locked;
blade_check(bladerf_set_pll_enable, dev, true);
-   blade_check(bladerf_set_pll_refclk, dev, 1000UL);
+   uint64_t refclock = 1000UL;
+   blade_check(bladerf_set_pll_refclk, dev, refclock);
for (int i = 0; i < 20; i++) {
usleep(50 * 1000);
bladerf_get_pll_lock_state(dev, _locked);

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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I590060d201445ad25cf5eb73c4b1360eaf6a6cea
Gerrit-Change-Number: 36338
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-MessageType: merged


[S] Change in osmo-trx[master]: contrib/jenkins: make configure args diff friendly

2024-03-18 Thread osmith
osmith has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36330?usp=email )

Change subject: contrib/jenkins: make configure args diff friendly
..

contrib/jenkins: make configure args diff friendly

Removing new lines in DISTCHECK_CONFIGURE_FLAGS again is needed, as it
otherwise fails with:
  enable-sanitize
  /bin/bash: line 1: enable-sanitize: command not found

Change-Id: I049af384eccdb6f8e5b305ca35de106eeaca3fa8
---
M contrib/jenkins.sh
1 file changed, 25 insertions(+), 2 deletions(-)

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




diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index 990e6f4..f896b86 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -85,7 +85,16 @@
 export LD_LIBRARY_PATH="$inst/lib"
 export PATH="$inst/bin:$PATH"

-CONFIG="--enable-sanitize --enable-werror --with-uhd --with-usrp1 --with-lms 
--with-ipc --with-mstrx $INSTR"
+CONFIG="
+   --enable-sanitize
+   --enable-werror
+   --with-ipc
+   --with-lms
+   --with-mstrx
+   --with-uhd
+   --with-usrp1
+   $INSTR
+"

 # Additional configure options and depends
 if [ "$WITH_MANUALS" = "1" ]; then
@@ -109,7 +118,7 @@
   || cat-testlogs.sh

 if arch | grep -v -q arm; then
-   DISTCHECK_CONFIGURE_FLAGS="$CONFIG" $MAKE $PARALLEL_MAKE distcheck \
+   DISTCHECK_CONFIGURE_FLAGS="$(echo $CONFIG | tr -d '\n')" $MAKE 
$PARALLEL_MAKE distcheck \
  || cat-testlogs.sh
 fi


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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I049af384eccdb6f8e5b305ca35de106eeaca3fa8
Gerrit-Change-Number: 36330
Gerrit-PatchSet: 3
Gerrit-Owner: osmith 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[M] Change in ...osmo-epdg[master]: epdg: Trigger AAR+AAA upon rx of RAR

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


Change subject: epdg: Trigger AAR+AAA upon rx of RAR
..

epdg: Trigger AAR+AAA upon rx of RAR

Related: OS#6406
Change-Id: I478b781e65eb5dd0cce5b51c75a1aa592b6555bc
---
M src/aaa_diameter_swm.erl
M src/aaa_ue_fsm.erl
M src/epdg_diameter_swm.erl
M src/epdg_ue_fsm.erl
4 files changed, 150 insertions(+), 17 deletions(-)



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

diff --git a/src/aaa_diameter_swm.erl b/src/aaa_diameter_swm.erl
index fadff7e..0f5e279 100644
--- a/src/aaa_diameter_swm.erl
+++ b/src/aaa_diameter_swm.erl
@@ -17,6 +17,7 @@
 -export([rx_der_auth_request/4,
 rx_der_auth_compl_request/2,
 rx_reauth_answer/2,
+rx_auth_request/1,
 rx_session_termination_request/1,
 rx_abort_session_answer/1]).
 -export([tx_dea_auth_response/2,
@@ -65,6 +66,10 @@
 rx_reauth_answer(Imsi, Result) ->
gen_server:cast(?SERVER, {raa, Imsi, Result}).

+% 3GPP TS 29.273 7.2.2.1.3 Diameter-AA-Request (AAR) Command
+rx_auth_request(Imsi) ->
+   gen_server:cast(?SERVER, {aar, Imsi}).
+
 rx_session_termination_request(Imsi) ->
gen_server:cast(?SERVER, {str, Imsi}).

@@ -98,6 +103,22 @@
end,
{noreply, State};

+handle_cast({aar, Imsi}, State) ->
+   case aaa_ue_fsm:get_pid_by_imsi(Imsi) of
+   Pid when is_pid(Pid) ->
+   case aaa_ue_fsm:ev_rx_swm_auth_request(Pid) of
+   ok ->
+   epdg_diameter_swm:rx_auth_answer(Imsi, ok);
+   _ ->
+   RC_UNABLE_TO_COMPLY=5012,
+   epdg_diameter_swm:rx_auth_answer(Imsi, {error, 
RC_UNABLE_TO_COMPLY})
+   end;
+   undefined ->
+   RC_USER_UNKNOWN=5030,
+   epdg_diameter_swm:rx_auth_answer(Imsi, {error, RC_USER_UNKNOWN})
+   end,
+   {noreply, State};
+
 handle_cast({str, Imsi}, State) ->
case aaa_ue_fsm:get_pid_by_imsi(Imsi) of
Pid when is_pid(Pid) ->
diff --git a/src/aaa_ue_fsm.erl b/src/aaa_ue_fsm.erl
index abbe40e..968c7bd 100644
--- a/src/aaa_ue_fsm.erl
+++ b/src/aaa_ue_fsm.erl
@@ -43,7 +43,8 @@
 -export([init/1,callback_mode/0,terminate/3]).
 -export([get_server_name_by_imsi/1, get_pid_by_imsi/1]).
 -export([ev_rx_swm_der_auth_req/2, ev_rx_swm_der_auth_compl/2,
- ev_rx_swm_reauth_answer/2, ev_rx_swm_str/1, ev_rx_swm_asa/1,
+ ev_rx_swm_reauth_answer/2, ev_rx_swm_auth_request/1,
+ ev_rx_swm_str/1, ev_rx_swm_asa/1,
  ev_rx_swx_maa/2, ev_rx_swx_saa/2, ev_rx_swx_ppr/2, ev_rx_swx_rtr/1,
  ev_rx_s6b_aar/2, ev_rx_s6b_str/1, ev_rx_s6b_raa/2, ev_rx_s6b_asa/2]).
 -export([state_new/3,
@@ -104,6 +105,15 @@
 {error, Err}
 end.

+ev_rx_swm_auth_request(Pid) ->
+lager:info("ue_fsm ev_rx_swm_auth_request~n", []),
+try
+gen_statem:call(Pid, rx_swm_auth_request)
+catch
+exit:Err ->
+{error, Err}
+end.
+
 ev_rx_swm_der_auth_compl(Pid, Apn) ->
 lager:info("ue_fsm ev_rx_swm_der_auth_compl~n", []),
 try
@@ -371,6 +381,11 @@
 %% SWx PPA was already answered immediately when PPR was received, 
nothing to do here.
 {keep_state, Data, [{reply,From,ok}]};

+state_authenticated({call, From}, rx_swm_auth_request, Data) ->
+lager:info("ue_fsm state_authenticated event=rx_swm_auth_request, 
~p~n", [Data]),
+%% answer is trnamsitted when returning ok:
+{keep_state, Data, [{reply,From,ok}]};
+
 state_authenticated({call, From}, {rx_s6b_raa, Result}, Data) ->
 lager:info("ue_fsm state_authenticated event=rx_s6b_raa ~p, ~p~n", 
[Result, Data]),
 %% SWx PPA was already answered immediately when PPR was received, 
nothing to do here.
diff --git a/src/epdg_diameter_swm.erl b/src/epdg_diameter_swm.erl
index cdf572f..ba5893c 100644
--- a/src/epdg_diameter_swm.erl
+++ b/src/epdg_diameter_swm.erl
@@ -15,13 +15,15 @@
 -export([code_change/3, terminate/2]).

 -export([tx_der_auth_request/4,
-tx_reauth_answer/2,
 tx_der_auth_compl_request/2,
+tx_reauth_answer/2,
+tx_auth_req/1,
 tx_session_termination_request/1,
 tx_abort_session_answer/1]).
 -export([rx_dea_auth_response/2,
 rx_dea_auth_compl_response/2,
 rx_reauth_request/1,
+rx_auth_answer/2,
 rx_session_termination_answer/2,
 rx_abort_session_request/1]).

@@ -56,6 +58,12 @@
ImsiStr = binary_to_list(Imsi),
ok = gen_server:cast(?SERVER, {tx_dia, {der_auth_compl_req, ImsiStr, 
Apn}}).

+% 3GPP TS 29.273 7.1.2.2
+tx_auth_req(Imsi) ->
+   % In Diameter we use Imsi as strings, as done by diameter module.
+   ImsiStr = binary_to_list(Imsi),
+   ok = gen_server:cast(?SERVER, {tx_dia, {aar, ImsiStr}}).
+
 % 3GPP 

[S] Change in ...osmo-epdg[master]: epdg_ue_fsm: Properly define type of field in record

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


Change subject: epdg_ue_fsm: Properly define type of field in record
..

epdg_ue_fsm: Properly define type of field in record

Change-Id: I0d1c91be2fadbcfecef8ca5aaf6df07b98a834f2
---
M src/epdg_ue_fsm.erl
1 file changed, 10 insertions(+), 1 deletion(-)



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

diff --git a/src/epdg_ue_fsm.erl b/src/epdg_ue_fsm.erl
index 4a090e9..bb4602f 100644
--- a/src/epdg_ue_fsm.erl
+++ b/src/epdg_ue_fsm.erl
@@ -68,7 +68,7 @@
 imsi,
 apn = "internet":: string(),
 pgw_rem_addr_list   = []:: list(),
-tun_pdp_ctx :: epdg_tun_pdp_ctx,
+tun_pdp_ctx :: #epdg_tun_pdp_ctx{},
 tear_down_gsup_needed   = false :: boolean(), %% need to send 
GSUP PurgeMSResp after STR+STA?
 tear_down_gsup_cause= 0 :: integer(),
 tear_down_s2b_needed= false :: boolean(), %% need to send 
S2b DeleteSessionReq

--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36341?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: I0d1c91be2fadbcfecef8ca5aaf6df07b98a834f2
Gerrit-Change-Number: 36341
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


[S] Change in ...osmo-epdg[master]: epdg: Tx SWm RAA from within epdg_ue_fsm

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


Change subject: epdg: Tx SWm RAA from within epdg_ue_fsm
..

epdg: Tx SWm RAA from within epdg_ue_fsm

Since previous commits, it is possible to transmit SWm messages from
within the epdg_ue_fsm, so do it now.

Change-Id: Ib31cf1ab4c7e10c910e54b9908b62eee26ee3cba
---
M src/epdg_diameter_swm.erl
M src/epdg_ue_fsm.erl
2 files changed, 15 insertions(+), 14 deletions(-)



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

diff --git a/src/epdg_diameter_swm.erl b/src/epdg_diameter_swm.erl
index bf7c0b1..cdf572f 100644
--- a/src/epdg_diameter_swm.erl
+++ b/src/epdg_diameter_swm.erl
@@ -147,14 +147,7 @@
Imsi = list_to_binary(ImsiStr),
case epdg_ue_fsm:get_pid_by_imsi(Imsi) of
Pid when is_pid(Pid) ->
-   case epdg_ue_fsm:received_swm_reauth_request(Pid) of
-   ok ->
-   DiaResultCode = 2001, %% SUCCESS
-   aaa_diameter_swm:rx_reauth_answer(ImsiStr, 
DiaResultCode);
-   _ ->
-   DiaResultCode = 5012, %% UNABLE_TO_COMPLY
-   aaa_diameter_swm:rx_reauth_answer(ImsiStr, 
DiaResultCode)
-   end;
+   epdg_ue_fsm:received_swm_reauth_request(Pid);
undefined ->
lager:notice("SWm Rx RAR: unknown swm-session ~p", [Imsi]),
DiaResultCode = 5002, %% UNKNOWN_SESSION_ID
diff --git a/src/epdg_ue_fsm.erl b/src/epdg_ue_fsm.erl
index 062083b..8a0c16e 100644
--- a/src/epdg_ue_fsm.erl
+++ b/src/epdg_ue_fsm.erl
@@ -341,14 +341,12 @@

 state_authenticated({call, From}, received_swm_reauth_request, Data) ->
 lager:info("ue_fsm state_authenticated 
event=received_swm_reauth_request, ~p~n", [Data]),
+epdg_diameter_swm:tx_reauth_answer(Data#ue_fsm_data.imsi, 
#epdg_dia_rc{result_code = 2001}),
 % TODO: 3GPP TS 29.273  7.1.2.5.1:
 % Upon receiving the re-authorization request, the ePDG shall 
immediately invoke the authorization procedure
 % specified in 7.1.2.2 for the session indicated in the request. This 
procedure is based on the Diameter
 % commands AA-Request (AAR) and AA-Answer (AAA) specified in IETF RFC 
4005 [4]. Information
 % element contents for these messages are shown in tables 7.1.2.2.1/1 
and 7.1.2.2.1/2.
-%
-% This is done synchronously for now when returning from call:
-%%epdg_diameter_swm:tx_reauth_answer(Data#ue_fsm_data.imsi, 
#epdg_dia_rc{result_code = 2001}),
 {keep_state, Data, [{reply,From,ok}]};

 state_authenticated({call, From}, purge_ms_request, Data) ->
@@ -422,14 +420,12 @@

 state_active({call, From}, received_swm_reauth_request, Data) ->
 lager:info("ue_fsm state_active event=received_swm_reauth_request, 
~p~n", [Data]),
+epdg_diameter_swm:tx_reauth_answer(Data#ue_fsm_data.imsi, 
#epdg_dia_rc{result_code = 2001}),
 % TODO: 3GPP TS 29.273  7.1.2.5.1:
 % Upon receiving the re-authorization request, the ePDG shall 
immediately invoke the authorization procedure
 % specified in 7.1.2.2 for the session indicated in the request. This 
procedure is based on the Diameter
 % commands AA-Request (AAR) and AA-Answer (AAA) specified in IETF RFC 
4005 [4]. Information
 % element contents for these messages are shown in tables 7.1.2.2.1/1 
and 7.1.2.2.1/2.
-%
-% This is done synchronously for now when returning from call:
-%%epdg_diameter_swm:tx_reauth_answer(Data#ue_fsm_data.imsi, 
#epdg_dia_rc{result_code = 2001}),
 {keep_state, Data, [{reply,From,ok}]};

 state_active({call, From}, purge_ms_request, Data) ->

--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36339?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: Ib31cf1ab4c7e10c910e54b9908b62eee26ee3cba
Gerrit-Change-Number: 36339
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


[L] Change in osmo-hnbgw[master]: RAB activation/modification/release statistics

2024-03-18 Thread fixeria
Attention is currently required from: dexter, laforge.

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

Change subject: RAB activation/modification/release statistics
..


Patch Set 3: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/36311?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: I198fa37699e22380909764de6a0522ac79aa1d39
Gerrit-Change-Number: 36311
Gerrit-PatchSet: 3
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Mon, 18 Mar 2024 16:14:37 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: contrib/jenkins: add --with-bladerf

2024-03-18 Thread fixeria
Attention is currently required from: osmith.

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

Change subject: contrib/jenkins: add --with-bladerf
..


Patch Set 4: Code-Review+1


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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I1300aa107fd1031cf921fafc3566f0f64f9cdd72
Gerrit-Change-Number: 36331
Gerrit-PatchSet: 4
Gerrit-Owner: osmith 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Mon, 18 Mar 2024 16:10:01 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: ms: fix up template deduction failure

2024-03-18 Thread fixeria
Attention is currently required from: osmith.

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

Change subject: ms: fix up template deduction failure
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I590060d201445ad25cf5eb73c4b1360eaf6a6cea
Gerrit-Change-Number: 36338
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Mon, 18 Mar 2024 16:09:49 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: contrib/jenkins: make configure args diff friendly

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

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

Change subject: contrib/jenkins: make configure args diff friendly
..


Patch Set 3: Code-Review+1


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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I049af384eccdb6f8e5b305ca35de106eeaca3fa8
Gerrit-Change-Number: 36330
Gerrit-PatchSet: 3
Gerrit-Owner: osmith 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Mon, 18 Mar 2024 16:09:00 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: ms: fix up template deduction failure

2024-03-18 Thread Hoernchen
Attention is currently required from: osmith.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36338?usp=email )

Change subject: ms: fix up template deduction failure
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I590060d201445ad25cf5eb73c4b1360eaf6a6cea
Gerrit-Change-Number: 36338
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Mon, 18 Mar 2024 15:54:33 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: contrib/jenkins: make configure args diff friendly

2024-03-18 Thread Hoernchen
Attention is currently required from: laforge, osmith, pespin.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36330?usp=email )

Change subject: contrib/jenkins: make configure args diff friendly
..


Patch Set 3: Code-Review+2


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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I049af384eccdb6f8e5b305ca35de106eeaca3fa8
Gerrit-Change-Number: 36330
Gerrit-PatchSet: 3
Gerrit-Owner: osmith 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Mon, 18 Mar 2024 15:54:31 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: ms: fix up template deduction failure

2024-03-18 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36338?usp=email )


Change subject: ms: fix up template deduction failure
..

ms: fix up template deduction failure

clang and gcc disagree, so just use a real var with the right type.

Change-Id: I590060d201445ad25cf5eb73c4b1360eaf6a6cea
---
M Transceiver52M/ms/bladerf_specific.h
1 file changed, 13 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/38/36338/1

diff --git a/Transceiver52M/ms/bladerf_specific.h 
b/Transceiver52M/ms/bladerf_specific.h
index f4abe57..9db8bf0 100644
--- a/Transceiver52M/ms/bladerf_specific.h
+++ b/Transceiver52M/ms/bladerf_specific.h
@@ -269,7 +269,8 @@

bool is_locked;
blade_check(bladerf_set_pll_enable, dev, true);
-   blade_check(bladerf_set_pll_refclk, dev, 1000UL);
+   uint64_t refclock = 1000UL;
+   blade_check(bladerf_set_pll_refclk, dev, refclock);
for (int i = 0; i < 20; i++) {
usleep(50 * 1000);
bladerf_get_pll_lock_state(dev, _locked);

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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I590060d201445ad25cf5eb73c4b1360eaf6a6cea
Gerrit-Change-Number: 36338
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-CC: Hoernchen 
Gerrit-MessageType: newchange


[S] Change in osmo-trx[master]: contrib/jenkins: make configure args diff friendly

2024-03-18 Thread osmith
Attention is currently required from: laforge, osmith.

Hello Jenkins Builder, laforge,

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

https://gerrit.osmocom.org/c/osmo-trx/+/36330?usp=email

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

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


Change subject: contrib/jenkins: make configure args diff friendly
..

contrib/jenkins: make configure args diff friendly

Removing new lines in DISTCHECK_CONFIGURE_FLAGS again is needed, as it
otherwise fails with:
  enable-sanitize
  /bin/bash: line 1: enable-sanitize: command not found

Change-Id: I049af384eccdb6f8e5b305ca35de106eeaca3fa8
---
M contrib/jenkins.sh
1 file changed, 25 insertions(+), 2 deletions(-)


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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I049af384eccdb6f8e5b305ca35de106eeaca3fa8
Gerrit-Change-Number: 36330
Gerrit-PatchSet: 3
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Attention: osmith 
Gerrit-Attention: laforge 
Gerrit-MessageType: newpatchset


[S] Change in osmo-trx[master]: debian: add osmo-trx-ms-blade

2024-03-18 Thread osmith
osmith has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36329?usp=email )

Change subject: debian: add osmo-trx-ms-blade
..

debian: add osmo-trx-ms-blade

Related: OS#6409
Change-Id: I85d24355975f292610bcde61a8917aec852043ca
---
M debian/control
A debian/osmo-trx-ms-blade.install
M debian/rules
3 files changed, 33 insertions(+), 0 deletions(-)

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




diff --git a/debian/control b/debian/control
index b1bb6c0..1186479 100644
--- a/debian/control
+++ b/debian/control
@@ -14,6 +14,7 @@
libtalloc-dev,
libusrp-dev,
liblimesuite-dev,
+   libbladerf-dev,
libosmocore-dev (>= 1.9.0),
osmo-gsm-manuals-dev (>= 1.5.0)
 Standards-Version: 3.9.6
@@ -110,6 +111,25 @@
  between different telecommunication associations for developing new
  generations of mobile phone networks. (post-2G/GSM)

+Package: osmo-trx-ms-blade
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: MS side transceiver (bladeRF)
+ OsmoTRX is a software-defined radio transceiver that implements the Layer 1
+ physical layer of a BTS comprising the following 3GPP specifications:
+ .
+ TS 05.01 "Physical layer on the radio path"
+ TS 05.02 "Multiplexing and Multiple Access on the Radio Path"
+ TS 05.04 "Modulation"
+ TS 05.10 "Radio subsystem synchronization"
+ .
+ In this context, BTS is "Base transceiver station". It's the stations that
+ connect mobile phones to the mobile network.
+ .
+ 3GPP is the "3rd Generation Partnership Project" which is the collaboration
+ between different telecommunication associations for developing new
+ generations of mobile phone networks. (post-2G/GSM)
+
 Package: osmo-trx-doc
 Architecture: all
 Section: doc
diff --git a/debian/osmo-trx-ms-blade.install b/debian/osmo-trx-ms-blade.install
new file mode 100644
index 000..0a3f163
--- /dev/null
+++ b/debian/osmo-trx-ms-blade.install
@@ -0,0 +1 @@
+/usr/bin/osmo-trx-ms-blade
diff --git a/debian/rules b/debian/rules
index e6cac87..5d4c73d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,8 +12,10 @@
dh_auto_configure -- \
--enable-manuals \
--with-systemdsystemunitdir=/lib/systemd/system \
+   --with-bladerf \
--with-ipc \
--with-lms \
+   --with-mstrx \
--with-uhd \
--with-usrp1 \
$(NULL)

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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I85d24355975f292610bcde61a8917aec852043ca
Gerrit-Change-Number: 36329
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-CC: pespin 
Gerrit-MessageType: merged


[M] Change in gapk[master]: debian: initial

2024-03-18 Thread osmith
osmith has submitted this change. ( 
https://gerrit.osmocom.org/c/gapk/+/36335?usp=email )

Change subject: debian: initial
..

debian: initial

Related: OS#6409
Change-Id: I8e9d42fc332c5d426b9074c6bc58bc6efe037fea
---
A debian/changelog
A debian/compat
A debian/control
A debian/copyright
A debian/gapk.install
A debian/libosmogapk-dev.install
A debian/libosmogapk0.install
A debian/rules
A debian/source/format
9 files changed, 94 insertions(+), 0 deletions(-)

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




diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 000..4cbf688
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+gapk (1.1) unstable; urgency=medium
+
+  * Initial debian packaging
+
+ -- Oliver Smith   Mon, 18 Mar 2024 13:15:22 +0100
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 000..f599e28
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+10
diff --git a/debian/control b/debian/control
new file mode 100644
index 000..556bbf8
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,37 @@
+Source: gapk
+Section: net
+Priority: optional
+Maintainer: Osmocom team 
+Build-Depends: debhelper (>= 10),
+   dh-autoreconf,
+   autotools-dev,
+   autoconf,
+   automake,
+   libtool,
+   pkg-config,
+   libasound2-dev,
+   libgsm1-dev,
+   libosmocore-dev (>= 0.3.2)
+Standards-Version: 4.1.4
+Vcs-Browser: https://gitea.osmocom.org/osmocom/gapk
+Vcs-Git: https://gerrit.osmocom.org/gapk
+Homepage: https://osmocom.org/projects/gapk/wiki/Gapk
+
+Package: gapk
+Architecture: any
+Multi-Arch: foreign
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: GSM Audio Pocket Knife converts between GSM related codecs
+
+Package: libosmogapk0
+Architecture: any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: GSM Audio Pocket Knife converts between GSM related codecs
+
+Package: libosmogapk-dev
+Section: libdevel
+Architecture: any
+Depends: libosmogapk0 (= ${binary:Version}), ${misc:Depends}
+Description: GSM Audio Pocket Knife converts between GSM related codecs
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 000..8d7bd0c
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,23 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: gapk
+Source: https://gitea.osmocom.org/osmocom/gapk
+
+Files: *
+License:   GPL-3.0+
+
+License:   GPL-3.0+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 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 General Public License
+ along with this program.  If not, see .
+ .
+ On Debian systems, the complete text of the GNU General Public License
+ Version 3 can be found in `/usr/share/common-licenses/GPL-3'.
diff --git a/debian/gapk.install b/debian/gapk.install
new file mode 100644
index 000..1df36c6
--- /dev/null
+++ b/debian/gapk.install
@@ -0,0 +1 @@
+usr/bin/*
diff --git a/debian/libosmogapk-dev.install b/debian/libosmogapk-dev.install
new file mode 100644
index 000..ab755d6
--- /dev/null
+++ b/debian/libosmogapk-dev.install
@@ -0,0 +1,3 @@
+usr/include/*
+usr/lib/*/pkgconfig/libosmogapk.pc
+usr/lib/*/*.so
diff --git a/debian/libosmogapk0.install b/debian/libosmogapk0.install
new file mode 100644
index 000..3de3b10
--- /dev/null
+++ b/debian/libosmogapk0.install
@@ -0,0 +1 @@
+usr/lib/*/*.so.*
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 000..c854d74
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,12 @@
+#!/usr/bin/make -f
+
+%:
+   dh $@ --with autoreconf
+
+override_dh_auto_configure:
+   touch libgsmhr/.downloaded  # Don't fetch 3GPP sources
+   dh_auto_configure
+
+# Print test results in case of a failure
+override_dh_auto_test:
+   dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false)
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 000..89ae9db
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (native)

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

Gerrit-Project: gapk
Gerrit-Branch: master
Gerrit-Change-Id: 

[M] Change in gapk[master]: debian: initial

2024-03-18 Thread Hoernchen
Attention is currently required from: osmith.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/gapk/+/36335?usp=email )

Change subject: debian: initial
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: gapk
Gerrit-Branch: master
Gerrit-Change-Id: I8e9d42fc332c5d426b9074c6bc58bc6efe037fea
Gerrit-Change-Number: 36335
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Mon, 18 Mar 2024 13:58:17 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in gapk[master]: gitignore: add .version and *~

2024-03-18 Thread osmith
osmith has submitted this change. ( 
https://gerrit.osmocom.org/c/gapk/+/36334?usp=email )

Change subject: gitignore: add .version and *~
..

gitignore: add .version and *~

Use *~ instead of *.*~, so it covers configure~ too.

Change-Id: If0b4c559727b04532353b267180c9d465b323d12
---
M .gitignore
1 file changed, 13 insertions(+), 2 deletions(-)

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




diff --git a/.gitignore b/.gitignore
index 15329a5..d2f9840 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,8 +3,8 @@
 configure.scan

 # autoreconf by-products
+.version
 Makefile.in
-
 aclocal.m4
 autom4te.cache/
 config.guess
@@ -49,7 +49,7 @@
 src/osmo-gapk

 # temporary/backup files
-*.*~
+*~
 .*.swp
 /compile
 .dirstamp

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

Gerrit-Project: gapk
Gerrit-Branch: master
Gerrit-Change-Id: If0b4c559727b04532353b267180c9d465b323d12
Gerrit-Change-Number: 36334
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[S] Change in gapk[master]: gitignore: add .version and *~

2024-03-18 Thread Hoernchen
Attention is currently required from: osmith.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/gapk/+/36334?usp=email )

Change subject: gitignore: add .version and *~
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: gapk
Gerrit-Branch: master
Gerrit-Change-Id: If0b4c559727b04532353b267180c9d465b323d12
Gerrit-Change-Number: 36334
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Mon, 18 Mar 2024 13:54:29 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in ...osmo-epdg[master]: epdg_diameter_swm: Convert Tx calls to casts

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


Change subject: epdg_diameter_swm: Convert Tx calls to casts
..

epdg_diameter_swm: Convert Tx calls to casts

This allows calling Tx function from within Rx paths in epdg_ue_fsm.

Change-Id: Id42ba265ffde735c0a68a4d11ef2dad56cfd
---
M src/epdg_diameter_swm.erl
M src/epdg_ue_fsm.erl
2 files changed, 63 insertions(+), 68 deletions(-)



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

diff --git a/src/epdg_diameter_swm.erl b/src/epdg_diameter_swm.erl
index 0badb28..bf7c0b1 100644
--- a/src/epdg_diameter_swm.erl
+++ b/src/epdg_diameter_swm.erl
@@ -43,53 +43,30 @@
% PdpTypeNr: SWm Diameter AVP "UE-Local-IP-Address"
% Apn: SWm Diameter AVP "Service-Selection"
% EAP: SWm Diameter AVP EAP-Payload
-   Result = gen_server:call(?SERVER, {tx_dia, {der_auth_req, ImsiStr, 
PdpTypeNr, Apn, EAP}}),
-   case Result of
-   {ok, _AuthTuples} ->
-   epdg_ue_fsm:received_swm_dea_auth_response(self(), 
Result),
-   ok;
-   _ -> Result
-   end.
+   ok = gen_server:cast(?SERVER, {tx_dia, {der_auth_req, ImsiStr, 
PdpTypeNr, Apn, EAP}}).
 
 tx_reauth_answer(Imsi, DiaRC) ->
% In Diameter we use Imsi as strings, as done by diameter module.
ImsiStr = binary_to_list(Imsi),
-   _Result = gen_server:call(?SERVER, {tx_dia, {raa, ImsiStr, DiaRC}}).
+   ok = gen_server:cast(?SERVER, {tx_dia, {raa, ImsiStr, DiaRC}}).

 % Rx "GSUP CEAI LU Req" is our way of saying Rx "Swm Diameter-EAP REQ (DER) 
with EAP AVP containing successuful auth":
 tx_der_auth_compl_request(Imsi, Apn) ->
% In Diameter we use Imsi as strings, as done by diameter module.
ImsiStr = binary_to_list(Imsi),
-   Result = gen_server:call(?SERVER, {tx_dia, {der_auth_compl_req, 
ImsiStr, Apn}}),
-   case Result of
-   {ok, _Mar} ->
-   
epdg_ue_fsm:received_swm_dea_auth_compl_response(self(), Result),
-   ok;
-   _ -> Result
-   end.
+   ok = gen_server:cast(?SERVER, {tx_dia, {der_auth_compl_req, ImsiStr, 
Apn}}).

 % 3GPP TS 29.273 7.1.2.3
 tx_session_termination_request(Imsi) ->
% In Diameter we use Imsi as strings, as done by diameter module.
ImsiStr = binary_to_list(Imsi),
-   Result = gen_server:call(?SERVER, {tx_dia, {str, ImsiStr}}),
-   case Result of
-   {ok, _Mar} ->
-   
epdg_ue_fsm:received_swm_session_terminate_answer(self(), Result),
-   ok;
-   _ -> Result
-   end.
+   ok = gen_server:cast(?SERVER, {tx_dia, {str, ImsiStr}}).

 % 3GPP TS 29.273 7.1.2.4
 tx_abort_session_answer(Imsi) ->
% In Diameter we use Imsi as strings, as done by diameter module.
ImsiStr = binary_to_list(Imsi),
-   Result = gen_server:call(?SERVER, {tx_dia, {asa, ImsiStr}}),
-   case Result of
-   {ok, _Mar} ->
-   ok;
-   _ -> Result
-   end.
+   ok = gen_server:cast(?SERVER, {tx_dia, {asa, ImsiStr}}).

 %% Emulation from the wire (DIAMETER SWm), called from internal AAA Server:
 rx_reauth_request(Imsi) ->
@@ -112,31 +89,39 @@
 rx_abort_session_request(Imsi) ->
ok = gen_server:cast(?SERVER, {rx_dia, {asr, Imsi}}).

-handle_call({tx_dia, {der_auth_req, Imsi, PdpTypeNr, Apn, EAP}}, _From, State) 
->
-   % we yet don't implement the Diameter SWm interface on the wire, we 
process the call internally:
-   ok = aaa_diameter_swm:rx_der_auth_request(Imsi, PdpTypeNr, Apn, EAP),
-   {reply, ok, State};

-handle_call({tx_dia, {raa, Imsi, DiaRC}}, _From, State) ->
+%% --
+%% Internal Function Definitions
+%% --
+
+handle_call(Request, From, State) ->
+   error_logger:error_report(["unknown handle_call", {module, ?MODULE}, 
{request, Request}, {from, From}, {state, State}]),
+   {reply, ok, State}.
+
+handle_cast({tx_dia, {der_auth_req, Imsi, PdpTypeNr, Apn, EAP}}, State) ->
+   % we yet don't implement the Diameter SWm interface on the wire, we 
process the call internally:
+   aaa_diameter_swm:rx_der_auth_request(Imsi, PdpTypeNr, Apn, EAP),
+   {noreply, State};
+
+handle_cast({tx_dia, {raa, Imsi, DiaRC}}, State) ->
% we yet don't implement the Diameter SWm interface on the wire, we 
process the call internally:
aaa_diameter_swm:rx_reauth_answer(Imsi, DiaRC#epdg_dia_rc.result_code),
-   {reply, ok, State};
+   {noreply, State};

-handle_call({tx_dia, {der_auth_compl_req, Imsi, Apn}}, _From, State) ->
+handle_cast({tx_dia, {der_auth_compl_req, Imsi, Apn}}, State) ->
% we yet don't implement the 

[M] Change in ...osmo-epdg[master]: epdg_diameter_swm: Rename gen_server events to easily identify direction

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


Change subject: epdg_diameter_swm: Rename gen_server events to easily identify 
direction
..

epdg_diameter_swm: Rename gen_server events to easily identify direction

This is a preparation commit towards turning Tx direction as casts
instead of calls, which will allow calling functions to transmit while
in rx path in epdg_ue_fsm.

Change-Id: I97fcd93839271ee9961dd31f335c7b1e8f0423be
---
M src/epdg_diameter_swm.erl
1 file changed, 50 insertions(+), 36 deletions(-)



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

diff --git a/src/epdg_diameter_swm.erl b/src/epdg_diameter_swm.erl
index 05fb87b..0badb28 100644
--- a/src/epdg_diameter_swm.erl
+++ b/src/epdg_diameter_swm.erl
@@ -43,7 +43,7 @@
% PdpTypeNr: SWm Diameter AVP "UE-Local-IP-Address"
% Apn: SWm Diameter AVP "Service-Selection"
% EAP: SWm Diameter AVP EAP-Payload
-   Result = gen_server:call(?SERVER, {der_auth_req, ImsiStr, PdpTypeNr, 
Apn, EAP}),
+   Result = gen_server:call(?SERVER, {tx_dia, {der_auth_req, ImsiStr, 
PdpTypeNr, Apn, EAP}}),
case Result of
{ok, _AuthTuples} ->
epdg_ue_fsm:received_swm_dea_auth_response(self(), 
Result),
@@ -54,13 +54,13 @@
 tx_reauth_answer(Imsi, DiaRC) ->
% In Diameter we use Imsi as strings, as done by diameter module.
ImsiStr = binary_to_list(Imsi),
-   _Result = gen_server:call(?SERVER, {raa, ImsiStr, DiaRC}).
+   _Result = gen_server:call(?SERVER, {tx_dia, {raa, ImsiStr, DiaRC}}).

 % Rx "GSUP CEAI LU Req" is our way of saying Rx "Swm Diameter-EAP REQ (DER) 
with EAP AVP containing successuful auth":
 tx_der_auth_compl_request(Imsi, Apn) ->
% In Diameter we use Imsi as strings, as done by diameter module.
ImsiStr = binary_to_list(Imsi),
-   Result = gen_server:call(?SERVER, {der_auth_compl_req, ImsiStr, Apn}),
+   Result = gen_server:call(?SERVER, {tx_dia, {der_auth_compl_req, 
ImsiStr, Apn}}),
case Result of
{ok, _Mar} ->

epdg_ue_fsm:received_swm_dea_auth_compl_response(self(), Result),
@@ -72,7 +72,7 @@
 tx_session_termination_request(Imsi) ->
% In Diameter we use Imsi as strings, as done by diameter module.
ImsiStr = binary_to_list(Imsi),
-   Result = gen_server:call(?SERVER, {str, ImsiStr}),
+   Result = gen_server:call(?SERVER, {tx_dia, {str, ImsiStr}}),
case Result of
{ok, _Mar} ->

epdg_ue_fsm:received_swm_session_terminate_answer(self(), Result),
@@ -84,39 +84,61 @@
 tx_abort_session_answer(Imsi) ->
% In Diameter we use Imsi as strings, as done by diameter module.
ImsiStr = binary_to_list(Imsi),
-   Result = gen_server:call(?SERVER, {asa, ImsiStr}),
+   Result = gen_server:call(?SERVER, {tx_dia, {asa, ImsiStr}}),
case Result of
{ok, _Mar} ->
ok;
_ -> Result
end.

-handle_call({der_auth_req, Imsi, PdpTypeNr, Apn, EAP}, _From, State) ->
+%% Emulation from the wire (DIAMETER SWm), called from internal AAA Server:
+rx_reauth_request(Imsi) ->
+   ok = gen_server:cast(?SERVER, {rx_dia, {rar, Imsi}}).
+
+%% Emulation from the wire (DIAMETER SWm), called from internal AAA Server:
+rx_dea_auth_response(Imsi, Result) ->
+   ok = gen_server:cast(?SERVER, {rx_dia, {dea_auth_resp, Imsi, Result}}).
+
+%Rx Swm Diameter-EAP Answer (DEA) containing APN-Configuration, triggered by
+%earlier Tx DER EAP AVP containing successuful auth":
+rx_dea_auth_compl_response(Imsi, Result) ->
+   ok = gen_server:cast(?SERVER, {rx_dia, {dea_auth_compl_resp, Imsi, 
Result}}).
+
+% Rx SWm Diameter STA:
+rx_session_termination_answer(Imsi, Result) ->
+   ok = gen_server:cast(?SERVER, {rx_dia, {sta, Imsi, Result}}).
+
+% Rx SWm Diameter ASR:
+rx_abort_session_request(Imsi) ->
+   ok = gen_server:cast(?SERVER, {rx_dia, {asr, Imsi}}).
+
+handle_call({tx_dia, {der_auth_req, Imsi, PdpTypeNr, Apn, EAP}}, _From, State) 
->
% we yet don't implement the Diameter SWm interface on the wire, we 
process the call internally:
ok = aaa_diameter_swm:rx_der_auth_request(Imsi, PdpTypeNr, Apn, EAP),
{reply, ok, State};

-handle_call({raa, Imsi, DiaRC}, _From, State) ->
+handle_call({tx_dia, {raa, Imsi, DiaRC}}, _From, State) ->
% we yet don't implement the Diameter SWm interface on the wire, we 
process the call internally:
aaa_diameter_swm:rx_reauth_answer(Imsi, DiaRC#epdg_dia_rc.result_code),
{reply, ok, State};

-handle_call({der_auth_compl_req, Imsi, Apn}, _From, State) ->
+handle_call({tx_dia, {der_auth_compl_req, Imsi, Apn}}, _From, State) ->
% we yet don't implement the Diameter SWm interface on the wire, we 
process the 

[M] Change in ...osmo-epdg[master]: Propagate SWx PPR as S6b Re-Auth-Request

2024-03-18 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36308?usp=email )

Change subject: Propagate SWx PPR as S6b Re-Auth-Request
..

Propagate SWx PPR as S6b Re-Auth-Request

This commit implements the 3GPP TS 29.273 section 9.1.2.5
"Service Authorization Information Update Procedures".

Related: OS#6400
Change-Id: I0e263dae37d5b8b3cdce2014787eb82910ed686a
---
M src/aaa_diameter_s6b.erl
M src/aaa_diameter_s6b_cb.erl
M src/aaa_ue_fsm.erl
3 files changed, 96 insertions(+), 12 deletions(-)

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




diff --git a/src/aaa_diameter_s6b.erl b/src/aaa_diameter_s6b.erl
index f8f9027..1639d02 100644
--- a/src/aaa_diameter_s6b.erl
+++ b/src/aaa_diameter_s6b.erl
@@ -49,7 +49,7 @@
 %% gen_server Function Exports
 -export([init/1, handle_call/3, handle_cast/2, handle_info/2, peer_down/3]).
 -export([code_change/3]).
--export([tx_as_request/1]).
+-export([tx_reauth_request/1, tx_as_request/1]).
 -export([tx_aa_answer/2, tx_st_answer/2]).

 %% Diameter Application Definitions
@@ -138,9 +138,30 @@
 % handle_request(STR) was spawned into its own process, and it's blocked 
waiting for STA:
 Pid ! {sta, DiaRC}.

+tx_reauth_request(NAI) ->
+gen_server:call(?SERVER, {rar, NAI}).
+
 tx_as_request(NAI) ->
 gen_server:call(?SERVER, {asr, NAI}).

+handle_call({rar, NAI}, _From, State) ->
+lager:debug("S6b Tx RAR NAI=~p~n", [NAI]),
+SessionId = diameter:session_id(application:get_env(?ENV_APP_NAME, 
dia_s6b_origin_host, ?ENV_DEFAULT_ORIG_HOST)),
+RAR = #'RAR'{'Session-Id' = SessionId,
+ 'Auth-Application-Id' = ?DIAMETER_APP_ID_S6b,
+ 'Re-Auth-Request-Type' = 
?'RE-AUTH-REQUEST-TYPE_AUTHORIZE_ONLY',
+ 'User-Name' = [NAI]
+},
+lager:debug("S6b Tx RAR: ~p~n", [RAR]),
+Ret = diameter_call(RAR, State),
+case Ret of
+ok ->
+{reply, ok, State};
+{error, Err} ->
+lager:error("Error: ~w~n", [Err]),
+{reply, {error, Err}, State}
+end;
+
 handle_call({asr, NAI}, _From, State) ->
 lager:debug("S6b Tx ASR NAI=~p~n", [NAI]),
 SessionId = diameter:session_id(application:get_env(?ENV_APP_NAME, 
dia_s6b_origin_host, ?ENV_DEFAULT_ORIG_HOST)),
diff --git a/src/aaa_diameter_s6b_cb.erl b/src/aaa_diameter_s6b_cb.erl
index b3f8d5f..8e2bcca 100644
--- a/src/aaa_diameter_s6b_cb.erl
+++ b/src/aaa_diameter_s6b_cb.erl
@@ -41,6 +41,15 @@
   | Avps]};
 % TODO: is there a simple way to capture all the following requests?
 prepare_request(#diameter_packet{msg = Req}, _, {_, Caps})
+   when is_record(Req, 'RAR') ->
+#diameter_caps{origin_host = {OH, DH}, origin_realm = {OR, DR}} = Caps,
+   Msg = Req#'RAR'{'Origin-Host' = OH,
+'Origin-Realm' = OR,
+'Destination-Realm' = DR,
+'Destination-Host' = DH},
+lager:debug("S6b prepare_request: ~p~n", [Msg]),
+   {send, Msg};
+prepare_request(#diameter_packet{msg = Req}, _, {_, Caps})
when is_record(Req, 'ASR') ->
 #diameter_caps{origin_host = {OH, DH}, origin_realm = {OR, DR}} = Caps,
Msg = Req#'ASR'{'Origin-Host' = OH,
@@ -134,6 +143,22 @@
 erlang:error({unexpected, ?MODULE, ?LINE}).

 %% handle_answer/4
+handle_answer(#diameter_packet{msg = Msg, errors = Errors}, Request, _SvcName, 
Peer) when is_record(Msg, 'RAA')  ->
+lager:info("S6b Rx RAA ~p: ~p/ Errors ~p ~n", [Peer, Msg, Errors]),
+% Obtain Imsi from originating Request:
+#'RAR'{'User-Name' = [NAI]} = Request,
+Imsi = conv:nai_to_imsi(NAI),
+PidRes = aaa_ue_fsm:get_pid_by_imsi(Imsi),
+#'RAA'{'Result-Code' = ResultCode} = Msg,
+DiaRC = #epdg_dia_rc{result_code = ResultCode},
+case conv:dia_rc_success(DiaRC) of
+ok ->
+aaa_ue_fsm:ev_rx_s6b_raa(PidRes, ok);
+_ ->
+aaa_ue_fsm:ev_rx_s6b_raa(PidRes, {error, DiaRC})
+end,
+{ok, Msg};
+
 handle_answer(#diameter_packet{msg = Msg, errors = Errors}, Request, _SvcName, 
Peer) when is_record(Msg, 'ASA')  ->
 lager:info("S6b Rx ASA ~p: ~p/ Errors ~p ~n", [Peer, Msg, Errors]),
 % Obtain Imsi from originating Request:
diff --git a/src/aaa_ue_fsm.erl b/src/aaa_ue_fsm.erl
index b32d6c0..d2e4aad 100644
--- a/src/aaa_ue_fsm.erl
+++ b/src/aaa_ue_fsm.erl
@@ -44,7 +44,7 @@
 -export([get_server_name_by_imsi/1, get_pid_by_imsi/1]).
 -export([ev_rx_swm_auth_req/2, ev_rx_swm_reauth_answer/2, 
ev_rx_swm_auth_compl/2, ev_rx_swm_str/1, ev_rx_swm_asa/1,
  ev_rx_swx_maa/2, ev_rx_swx_saa/2, ev_rx_swx_ppr/2, ev_rx_swx_rtr/1,
- ev_rx_s6b_aar/2, ev_rx_s6b_str/1, ev_rx_s6b_asa/2]).
+ ev_rx_s6b_aar/2, ev_rx_s6b_str/1, ev_rx_s6b_raa/2, ev_rx_s6b_asa/2]).
 -export([state_new/3,
  state_wait_swx_maa/3,
  state_wait_swx_saa/3,
@@ 

[S] Change in ...osmo-epdg[master]: epdg_diameter_swm: Fix typo in log line

2024-03-18 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36325?usp=email )

Change subject: epdg_diameter_swm: Fix typo in log line
..

epdg_diameter_swm: Fix typo in log line

Change-Id: I62087791ef947ada48da3592193c4c5cd4159147
---
M src/epdg_diameter_swm.erl
1 file changed, 10 insertions(+), 1 deletion(-)

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




diff --git a/src/epdg_diameter_swm.erl b/src/epdg_diameter_swm.erl
index d78407c..c479b44 100644
--- a/src/epdg_diameter_swm.erl
+++ b/src/epdg_diameter_swm.erl
@@ -174,7 +174,7 @@
aaa_diameter_swm:rx_reauth_answer(Imsi, DiaResultCode)
end;
undefined ->
-   lager:notice("SWm Rx AAR: unknown swm-session ~p", [Imsi]),
+   lager:notice("SWm Rx RAR: unknown swm-session ~p", [Imsi]),
DiaResultCode = 5002, %% UNKNOWN_SESSION_ID
aaa_diameter_swm:rx_reauth_answer(Imsi, DiaResultCode)
end,

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


[M] Change in ...osmo-epdg[master]: Propagate SWx PPR as S6b Re-Auth-Request

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

Change subject: Propagate SWx PPR as S6b Re-Auth-Request
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36308?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: I0e263dae37d5b8b3cdce2014787eb82910ed686a
Gerrit-Change-Number: 36308
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Mon, 18 Mar 2024 13:47:17 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: debian/rules: make configure args diff friendly

2024-03-18 Thread osmith
osmith has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36328?usp=email )

Change subject: debian/rules: make configure args diff friendly
..

debian/rules: make configure args diff friendly

Have one arg per line, and order it mostly alphabetically while at it
(backends are still together, as recommended in review).

Change-Id: I354affacb38958efe70baedc6175aeab525190a6
---
M debian/rules
1 file changed, 20 insertions(+), 1 deletion(-)

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




diff --git a/debian/rules b/debian/rules
index 5795643..e6cac87 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,7 +9,14 @@
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info

 override_dh_auto_configure:
-   dh_auto_configure -- --with-uhd --with-usrp1 --with-lms --with-ipc 
--with-systemdsystemunitdir=/lib/systemd/system --enable-manuals
+   dh_auto_configure -- \
+   --enable-manuals \
+   --with-systemdsystemunitdir=/lib/systemd/system \
+   --with-ipc \
+   --with-lms \
+   --with-uhd \
+   --with-usrp1 \
+   $(NULL)

 override_dh_strip:
dh_strip --dbg-package=osmo-trx-dbg

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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I354affacb38958efe70baedc6175aeab525190a6
Gerrit-Change-Number: 36328
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[M] Change in gapk[master]: debian: initial

2024-03-18 Thread pespin
Attention is currently required from: Hoernchen, osmith.

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

Change subject: debian: initial
..


Patch Set 2: Code-Review+1


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

Gerrit-Project: gapk
Gerrit-Branch: master
Gerrit-Change-Id: I8e9d42fc332c5d426b9074c6bc58bc6efe037fea
Gerrit-Change-Number: 36335
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: Hoernchen 
Gerrit-Comment-Date: Mon, 18 Mar 2024 13:37:37 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in gapk[master]: gitignore: add .version and *~

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

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

Change subject: gitignore: add .version and *~
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: gapk
Gerrit-Branch: master
Gerrit-Change-Id: If0b4c559727b04532353b267180c9d465b323d12
Gerrit-Change-Number: 36334
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Mon, 18 Mar 2024 13:37:02 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[L] Change in osmo-hnbgw[master]: RAB activation/modification/release statistics

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

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

Change subject: RAB activation/modification/release statistics
..


Patch Set 3: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/36311?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: I198fa37699e22380909764de6a0522ac79aa1d39
Gerrit-Change-Number: 36311
Gerrit-PatchSet: 3
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: pespin 
Gerrit-CC: fixeria 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Mon, 18 Mar 2024 13:36:13 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in gapk[master]: debian: initial

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

Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/gapk/+/36335?usp=email

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


Change subject: debian: initial
..

debian: initial

Related: OS#6409
Change-Id: I8e9d42fc332c5d426b9074c6bc58bc6efe037fea
---
A debian/changelog
A debian/compat
A debian/control
A debian/copyright
A debian/gapk.install
A debian/libosmogapk-dev.install
A debian/libosmogapk0.install
A debian/rules
A debian/source/format
9 files changed, 94 insertions(+), 0 deletions(-)


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

Gerrit-Project: gapk
Gerrit-Branch: master
Gerrit-Change-Id: I8e9d42fc332c5d426b9074c6bc58bc6efe037fea
Gerrit-Change-Number: 36335
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: osmith 
Gerrit-MessageType: newpatchset


[S] Change in gapk[master]: gitignore: add .version and *~

2024-03-18 Thread osmith
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/gapk/+/36334?usp=email )

Change subject: gitignore: add .version and *~
..


Patch Set 1: Verified+1

(1 comment)

Patchset:

PS1:
debian:12 CI check failing here is expected, debian packaging gets added in the 
next patch



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

Gerrit-Project: gapk
Gerrit-Branch: master
Gerrit-Change-Id: If0b4c559727b04532353b267180c9d465b323d12
Gerrit-Change-Number: 36334
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Mon, 18 Mar 2024 13:27:34 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in gapk[master]: gitignore: add .version and *~

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

osmith has removed a vote from this change. ( 
https://gerrit.osmocom.org/c/gapk/+/36334?usp=email )


Change subject: gitignore: add .version and *~
..


Removed Verified-1 by Jenkins Builder (102)
--
To view, visit https://gerrit.osmocom.org/c/gapk/+/36334?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: gapk
Gerrit-Branch: master
Gerrit-Change-Id: If0b4c559727b04532353b267180c9d465b323d12
Gerrit-Change-Number: 36334
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: osmith 
Gerrit-MessageType: deleteVote


[M] Change in gapk[master]: debian: initial

2024-03-18 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/gapk/+/36335?usp=email )


Change subject: debian: initial
..

debian: initial

Change-Id: I8e9d42fc332c5d426b9074c6bc58bc6efe037fea
---
A debian/changelog
A debian/compat
A debian/control
A debian/copyright
A debian/gapk.install
A debian/libosmogapk-dev.install
A debian/libosmogapk0.install
A debian/rules
A debian/source/format
9 files changed, 93 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/gapk refs/changes/35/36335/1

diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 000..4cbf688
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+gapk (1.1) unstable; urgency=medium
+
+  * Initial debian packaging
+
+ -- Oliver Smith   Mon, 18 Mar 2024 13:15:22 +0100
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 000..f599e28
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+10
diff --git a/debian/control b/debian/control
new file mode 100644
index 000..556bbf8
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,37 @@
+Source: gapk
+Section: net
+Priority: optional
+Maintainer: Osmocom team 
+Build-Depends: debhelper (>= 10),
+   dh-autoreconf,
+   autotools-dev,
+   autoconf,
+   automake,
+   libtool,
+   pkg-config,
+   libasound2-dev,
+   libgsm1-dev,
+   libosmocore-dev (>= 0.3.2)
+Standards-Version: 4.1.4
+Vcs-Browser: https://gitea.osmocom.org/osmocom/gapk
+Vcs-Git: https://gerrit.osmocom.org/gapk
+Homepage: https://osmocom.org/projects/gapk/wiki/Gapk
+
+Package: gapk
+Architecture: any
+Multi-Arch: foreign
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: GSM Audio Pocket Knife converts between GSM related codecs
+
+Package: libosmogapk0
+Architecture: any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: GSM Audio Pocket Knife converts between GSM related codecs
+
+Package: libosmogapk-dev
+Section: libdevel
+Architecture: any
+Depends: libosmogapk0 (= ${binary:Version}), ${misc:Depends}
+Description: GSM Audio Pocket Knife converts between GSM related codecs
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 000..8d7bd0c
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,23 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: gapk
+Source: https://gitea.osmocom.org/osmocom/gapk
+
+Files: *
+License:   GPL-3.0+
+
+License:   GPL-3.0+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 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 General Public License
+ along with this program.  If not, see .
+ .
+ On Debian systems, the complete text of the GNU General Public License
+ Version 3 can be found in `/usr/share/common-licenses/GPL-3'.
diff --git a/debian/gapk.install b/debian/gapk.install
new file mode 100644
index 000..1df36c6
--- /dev/null
+++ b/debian/gapk.install
@@ -0,0 +1 @@
+usr/bin/*
diff --git a/debian/libosmogapk-dev.install b/debian/libosmogapk-dev.install
new file mode 100644
index 000..ab755d6
--- /dev/null
+++ b/debian/libosmogapk-dev.install
@@ -0,0 +1,3 @@
+usr/include/*
+usr/lib/*/pkgconfig/libosmogapk.pc
+usr/lib/*/*.so
diff --git a/debian/libosmogapk0.install b/debian/libosmogapk0.install
new file mode 100644
index 000..3de3b10
--- /dev/null
+++ b/debian/libosmogapk0.install
@@ -0,0 +1 @@
+usr/lib/*/*.so.*
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 000..c854d74
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,12 @@
+#!/usr/bin/make -f
+
+%:
+   dh $@ --with autoreconf
+
+override_dh_auto_configure:
+   touch libgsmhr/.downloaded  # Don't fetch 3GPP sources
+   dh_auto_configure
+
+# Print test results in case of a failure
+override_dh_auto_test:
+   dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false)
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 000..89ae9db
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (native)

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

Gerrit-Project: gapk
Gerrit-Branch: master
Gerrit-Change-Id: I8e9d42fc332c5d426b9074c6bc58bc6efe037fea
Gerrit-Change-Number: 36335
Gerrit-PatchSet: 1
Gerrit-Owner: 

[S] Change in gapk[master]: gitignore: add .version and *~

2024-03-18 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/gapk/+/36334?usp=email )


Change subject: gitignore: add .version and *~
..

gitignore: add .version and *~

Use *~ instead of *.*~, so it covers configure~ too.

Change-Id: If0b4c559727b04532353b267180c9d465b323d12
---
M .gitignore
1 file changed, 13 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/gapk refs/changes/34/36334/1

diff --git a/.gitignore b/.gitignore
index 15329a5..d2f9840 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,8 +3,8 @@
 configure.scan

 # autoreconf by-products
+.version
 Makefile.in
-
 aclocal.m4
 autom4te.cache/
 config.guess
@@ -49,7 +49,7 @@
 src/osmo-gapk

 # temporary/backup files
-*.*~
+*~
 .*.swp
 /compile
 .dirstamp

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

Gerrit-Project: gapk
Gerrit-Branch: master
Gerrit-Change-Id: If0b4c559727b04532353b267180c9d465b323d12
Gerrit-Change-Number: 36334
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


[S] Change in osmo-trx[master]: contrib/jenkins: add --with-bladerf

2024-03-18 Thread Hoernchen
Attention is currently required from: osmith.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36331?usp=email )

Change subject: contrib/jenkins: add --with-bladerf
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I1300aa107fd1031cf921fafc3566f0f64f9cdd72
Gerrit-Change-Number: 36331
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Mon, 18 Mar 2024 13:08:09 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: debian: add osmo-trx-ms-blade

2024-03-18 Thread Hoernchen
Attention is currently required from: osmith, pespin.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36329?usp=email )

Change subject: debian: add osmo-trx-ms-blade
..


Patch Set 2: Code-Review+2

(1 comment)

File debian/control:

https://gerrit.osmocom.org/c/osmo-trx/+/36329/comment/ea4df7e4_e9a6ac43
PS1, Line 19:libbladerf-dev
> I'd say better put the "backend dependency" together with the other ones, aka 
> liblimesuite-dev and l […]
Ack



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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I85d24355975f292610bcde61a8917aec852043ca
Gerrit-Change-Number: 36329
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Mon, 18 Mar 2024 13:07:47 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: contrib/jenkins: add --with-bladerf

2024-03-18 Thread laforge
Attention is currently required from: osmith.

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

Change subject: contrib/jenkins: add --with-bladerf
..


Patch Set 2: Code-Review+1


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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I1300aa107fd1031cf921fafc3566f0f64f9cdd72
Gerrit-Change-Number: 36331
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: laforge 
Gerrit-CC: Jenkins Builder
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Mon, 18 Mar 2024 12:53:01 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: contrib/jenkins: make configure args diff friendly

2024-03-18 Thread laforge
Attention is currently required from: osmith.

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

Change subject: contrib/jenkins: make configure args diff friendly
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I049af384eccdb6f8e5b305ca35de106eeaca3fa8
Gerrit-Change-Number: 36330
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: laforge 
Gerrit-CC: Jenkins Builder
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Mon, 18 Mar 2024 12:52:53 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: debian: add osmo-trx-ms-blade

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

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

Change subject: debian: add osmo-trx-ms-blade
..


Patch Set 2: Code-Review+1


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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I85d24355975f292610bcde61a8917aec852043ca
Gerrit-Change-Number: 36329
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: laforge 
Gerrit-CC: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Mon, 18 Mar 2024 12:52:43 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: debian/rules: make configure args diff friendly

2024-03-18 Thread laforge
Attention is currently required from: Hoernchen, osmith, pespin.

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

Change subject: debian/rules: make configure args diff friendly
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I354affacb38958efe70baedc6175aeab525190a6
Gerrit-Change-Number: 36328
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-CC: Jenkins Builder
Gerrit-Attention: osmith 
Gerrit-Attention: Hoernchen 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Mon, 18 Mar 2024 12:52:25 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[L] Change in osmo-hnbgw[master]: RAB activation/modification/release statistics

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

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

Change subject: RAB activation/modification/release statistics
..


Patch Set 2:

(4 comments)

File include/osmocom/hnbgw/context_map.h:

https://gerrit.osmocom.org/c/osmo-hnbgw/+/36311/comment/9bdce008_47b77613
PS2, Line 5: osmocom/core/bitvec.h
> Why do we need this import in a header file? Looks unrelated and unneeded.
thanks. it's anrtifact of an earlier version of the patch, where I used a 
bit-mask of RABs - however, this turned out to be insufficient as we'd need at 
least two bits per RAB.


https://gerrit.osmocom.org/c/osmo-hnbgw/+/36311/comment/a6321af0_89528da6
PS2, Line 173:  uint8_t rab_state[256];
> This is something we most probably want to have as some sort of bitmask in 
> the future, eg using 2 bi […]
it actually was a bitmask with one bit in the beginning, but then I had to move 
to away from that.  Using an array is simple and works.   In the end, even at 
e.g. 1 UE, this is only 2.5 Megabytes of RAM.  Nothing to worry about.

What would make more sense is to unify this information with the ps_rabs list 
and the mgw_fsm further above.  So that basically there's one object for 
per-RAB information and not multiple.


File src/osmo-hnbgw/kpi_ranap.c:

https://gerrit.osmocom.org/c/osmo-hnbgw/+/36311/comment/6f3aba76_4153dde6
PS2, Line 54: ranap_message *ranap
> `const` like above?
I had that originally, but it sadly doesn't work.  I don't recall where it 
failed, but I think some of the osmo-iuh generated code doesn't permit passing 
a const structure [even when it should].


https://gerrit.osmocom.org/c/osmo-hnbgw/+/36311/comment/5c782278_f640df6a
PS2, Line 362:  //kpi_ranap_process_dl_iu_rel_cmpl(map, ranap); 
/* IU RELEASE COMPLETE (8.5) */
> why is this one commented out?
I think I originally thought we'd need to track something here, but then didn't 
need it after all.  Looking at the specs again, it looks like there's a list of 
released RABs in this message, so we might use that instead of simply assuming 
all RABs are releaed in the IU RELEASE COMMAND.  I'll add a comment to say that.



--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/36311?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: I198fa37699e22380909764de6a0522ac79aa1d39
Gerrit-Change-Number: 36311
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: pespin 
Gerrit-CC: fixeria 
Gerrit-Attention: fixeria 
Gerrit-Attention: pespin 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Mon, 18 Mar 2024 12:51:56 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[L] Change in osmo-hnbgw[master]: RAB activation/modification/release statistics

2024-03-18 Thread laforge
Attention is currently required from: dexter, laforge.

Hello Jenkins Builder, dexter, pespin,

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

https://gerrit.osmocom.org/c/osmo-hnbgw/+/36311?usp=email

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

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


Change subject: RAB activation/modification/release statistics
..

RAB activation/modification/release statistics

Add rate_ctr based statistics for RAB activation, deactivation and
failures.  This requires us to parse RANAP in both uplink and downlink
and to iterate deep into the setup/modify/release/failure lists.

Given the way how the protocol works, the only way to distinguish an
activation from a modification is because sender and recipient know
whether a given RAB is already active at the time of the message.  So we
also need to track the activation state of each RAB.

Depends: osmo-iuh.git Change-Id I328819c650fc6cefe735093a846277b4f03e6b29
Change-Id: I198fa37699e22380909764de6a0522ac79aa1d39
---
M include/osmocom/hnbgw/Makefile.am
M include/osmocom/hnbgw/context_map.h
M include/osmocom/hnbgw/hnbgw.h
A include/osmocom/hnbgw/kpi.h
M src/osmo-hnbgw/Makefile.am
M src/osmo-hnbgw/context_map_rua.c
M src/osmo-hnbgw/context_map_sccp.c
M src/osmo-hnbgw/hnbgw.c
A src/osmo-hnbgw/kpi_ranap.c
9 files changed, 504 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/11/36311/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/36311?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: I198fa37699e22380909764de6a0522ac79aa1d39
Gerrit-Change-Number: 36311
Gerrit-PatchSet: 3
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: pespin 
Gerrit-CC: fixeria 
Gerrit-Attention: laforge 
Gerrit-Attention: dexter 
Gerrit-MessageType: newpatchset


[S] Change in osmo-trx[master]: debian/rules: make configure args diff friendly

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

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

Change subject: debian/rules: make configure args diff friendly
..


Patch Set 2:

(1 comment)

File debian/rules:

https://gerrit.osmocom.org/c/osmo-trx/+/36328/comment/b07434ce_cd8446ee
PS1, Line 16:   --with-systemdsystemunitdir=/lib/systemd/system \
> I would really put the systemd one separate from the "enable backend" ones.
Done



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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I354affacb38958efe70baedc6175aeab525190a6
Gerrit-Change-Number: 36328
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-CC: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Mon, 18 Mar 2024 12:47:04 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: debian: add osmo-trx-ms-blade

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

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

Change subject: debian: add osmo-trx-ms-blade
..


Patch Set 1:

(1 comment)

File debian/control:

https://gerrit.osmocom.org/c/osmo-trx/+/36329/comment/2ba46d1c_5a7660f3
PS1, Line 19:libbladerf-dev
> I'd say better put the "backend dependency" together with the other ones, aka 
> liblimesuite-dev and l […]
Done



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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I85d24355975f292610bcde61a8917aec852043ca
Gerrit-Change-Number: 36329
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-CC: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Mon, 18 Mar 2024 12:46:55 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: debian/rules: make configure args diff friendly

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

osmith has uploaded a new patch set (#2). ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36328?usp=email )


Change subject: debian/rules: make configure args diff friendly
..

debian/rules: make configure args diff friendly

Have one arg per line, and order it mostly alphabetically while at it
(backends are still together, as recommended in review).

Change-Id: I354affacb38958efe70baedc6175aeab525190a6
---
M debian/rules
1 file changed, 20 insertions(+), 1 deletion(-)


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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I354affacb38958efe70baedc6175aeab525190a6
Gerrit-Change-Number: 36328
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-CC: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: osmith 
Gerrit-MessageType: newpatchset


[S] Change in osmo-trx[master]: debian: add osmo-trx-ms-blade

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

osmith has uploaded a new patch set (#2). ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36329?usp=email )


Change subject: debian: add osmo-trx-ms-blade
..

debian: add osmo-trx-ms-blade

Related: OS#6409
Change-Id: I85d24355975f292610bcde61a8917aec852043ca
---
M debian/control
A debian/osmo-trx-ms-blade.install
M debian/rules
3 files changed, 33 insertions(+), 0 deletions(-)


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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I85d24355975f292610bcde61a8917aec852043ca
Gerrit-Change-Number: 36329
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-CC: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: osmith 
Gerrit-MessageType: newpatchset


[S] Change in osmo-trx[master]: gitignore: add .version

2024-03-18 Thread osmith
osmith has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36327?usp=email )

Change subject: gitignore: add .version
..

gitignore: add .version

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

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




diff --git a/.gitignore b/.gitignore
index 581b08f..fc567db 100644
--- a/.gitignore
+++ b/.gitignore
@@ -38,6 +38,7 @@
 .deps
 .libs
 .dirstamp
+.version
 *~
 Makefile
 config.log

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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Ib75781b5d473921b42936e4d3c441e6a520b9108
Gerrit-Change-Number: 36327
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-CC: Jenkins Builder
Gerrit-MessageType: merged


[S] Change in osmo-trx[master]: gitignore: add .version

2024-03-18 Thread osmith
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36327?usp=email )

Change subject: gitignore: add .version
..


Patch Set 1: Verified+1


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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Ib75781b5d473921b42936e4d3c441e6a520b9108
Gerrit-Change-Number: 36327
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Mon, 18 Mar 2024 12:43:22 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: gitignore: add .version

2024-03-18 Thread Hoernchen
Attention is currently required from: osmith.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36327?usp=email )

Change subject: gitignore: add .version
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Ib75781b5d473921b42936e4d3c441e6a520b9108
Gerrit-Change-Number: 36327
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: pespin 
Gerrit-CC: Jenkins Builder
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Mon, 18 Mar 2024 12:40:52 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: debian: add osmo-trx-ms-blade

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

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

Change subject: debian: add osmo-trx-ms-blade
..


Patch Set 1:

(1 comment)

File debian/control:

https://gerrit.osmocom.org/c/osmo-trx/+/36329/comment/a664a722_944dc00f
PS1, Line 19:libbladerf-dev
I'd say better put the "backend dependency" together with the other ones, aka 
liblimesuite-dev and libusrp-dev.



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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I85d24355975f292610bcde61a8917aec852043ca
Gerrit-Change-Number: 36329
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-CC: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Mon, 18 Mar 2024 12:40:16 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: debian/rules: make configure args diff friendly

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

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

Change subject: debian/rules: make configure args diff friendly
..


Patch Set 1:

(1 comment)

File debian/rules:

https://gerrit.osmocom.org/c/osmo-trx/+/36328/comment/c9493c09_5054ee05
PS1, Line 16:   --with-systemdsystemunitdir=/lib/systemd/system \
I would really put the systemd one separate from the "enable backend" ones.



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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I354affacb38958efe70baedc6175aeab525190a6
Gerrit-Change-Number: 36328
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-CC: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Mon, 18 Mar 2024 12:39:03 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: gitignore: add .version

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

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

Change subject: gitignore: add .version
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Ib75781b5d473921b42936e4d3c441e6a520b9108
Gerrit-Change-Number: 36327
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: pespin 
Gerrit-CC: Jenkins Builder
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Mon, 18 Mar 2024 12:38:24 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in ...osmo-epdg[master]: Rename code paths Tx/Rx of Diameter Swm DER/DEA

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


Change subject: Rename code paths Tx/Rx of Diameter Swm DER/DEA
..

Rename code paths Tx/Rx of Diameter Swm DER/DEA

Rename all related code paths related to Tx/Rx of DER and DEA messages,
so that it becomes easier to match code to spec references.

Change-Id: I4f4219ab04dce4ca7aac3a0410ac94a41080949f
---
M src/aaa_diameter_swm.erl
M src/aaa_ue_fsm.erl
M src/epdg_diameter_swm.erl
M src/epdg_ue_fsm.erl
4 files changed, 84 insertions(+), 71 deletions(-)



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

diff --git a/src/aaa_diameter_swm.erl b/src/aaa_diameter_swm.erl
index c7c87a5..fadff7e 100644
--- a/src/aaa_diameter_swm.erl
+++ b/src/aaa_diameter_swm.erl
@@ -14,13 +14,13 @@
 -export([init/1, handle_call/3, handle_cast/2, handle_info/2]).
 -export([code_change/3, terminate/2]).

--export([rx_auth_request/4,
-rx_auth_compl_request/2,
+-export([rx_der_auth_request/4,
+rx_der_auth_compl_request/2,
 rx_reauth_answer/2,
 rx_session_termination_request/1,
 rx_abort_session_answer/1]).
--export([tx_auth_response/2,
-tx_auth_compl_response/2,
+-export([tx_dea_auth_response/2,
+tx_dea_auth_compl_response/2,
 tx_reauth_request/1,
 tx_session_termination_answer/2,
 tx_as_request/1]).
@@ -38,11 +38,11 @@
 % Tx over emulated SWm wire:
 %%

-tx_auth_response(Imsi, Result) ->
-   _Result = gen_server:call(?SERVER, {epdg_auth_resp, Imsi, Result}).
+tx_dea_auth_response(Imsi, Result) ->
+   _Result = gen_server:call(?SERVER, {dea_auth_resp, Imsi, Result}).

-tx_auth_compl_response(Imsi, Result) ->
-   _Result = gen_server:call(?SERVER, {epdg_auth_compl_resp, Imsi, 
Result}).
+tx_dea_auth_compl_response(Imsi, Result) ->
+   _Result = gen_server:call(?SERVER, {dea_auth_compl_resp, Imsi, Result}).

 tx_reauth_request(Imsi) ->
_Result = gen_server:call(?SERVER, {rar, Imsi}).
@@ -56,11 +56,11 @@
 %%
 % Rx from emulated SWm wire:
 %%
-rx_auth_request(Imsi, PdpTypeNr, Apn, EAP) ->
-   gen_server:cast(?SERVER, {epdg_auth_req, Imsi, PdpTypeNr, Apn, EAP}).
+rx_der_auth_request(Imsi, PdpTypeNr, Apn, EAP) ->
+   gen_server:cast(?SERVER, {der_auth_req, Imsi, PdpTypeNr, Apn, EAP}).

-rx_auth_compl_request(Imsi, Apn) ->
-   gen_server:cast(?SERVER, {epdg_auth_compl_req, Imsi, Apn}).
+rx_der_auth_compl_request(Imsi, Apn) ->
+   gen_server:cast(?SERVER, {der_auth_compl_req, Imsi, Apn}).

 rx_reauth_answer(Imsi, Result) ->
gen_server:cast(?SERVER, {raa, Imsi, Result}).
@@ -73,21 +73,21 @@

 %% handle_cast: Rx side

-handle_cast({epdg_auth_req, Imsi, PdpTypeNr, Apn, EAP}, State) ->
+handle_cast({der_auth_req, Imsi, PdpTypeNr, Apn, EAP}, State) ->
case aaa_ue_fsm:get_pid_by_imsi(Imsi) of
undefined -> {ok, Pid} = aaa_ue_fsm:start(Imsi);
Pid -> Pid
end,
-   aaa_ue_fsm:ev_rx_swm_auth_req(Pid, {PdpTypeNr, Apn, EAP}),
+   aaa_ue_fsm:ev_rx_swm_der_auth_req(Pid, {PdpTypeNr, Apn, EAP}),
{noreply, State};

-handle_cast({epdg_auth_compl_req, Imsi, Apn}, State) ->
+handle_cast({der_auth_compl_req, Imsi, Apn}, State) ->
case aaa_ue_fsm:get_pid_by_imsi(Imsi) of
Pid when is_pid(Pid) ->
-   aaa_ue_fsm:ev_rx_swm_auth_compl(Pid, Apn);
+   aaa_ue_fsm:ev_rx_swm_der_auth_compl(Pid, Apn);
undefined ->
RC_USER_UNKNOWN=5030,
-   epdg_diameter_swm:rx_auth_compl_response(Imsi, {error, 
RC_USER_UNKNOWN})
+   epdg_diameter_swm:rx_dea_auth_compl_response(Imsi, {error, 
RC_USER_UNKNOWN})
end,
{noreply, State};

@@ -133,12 +133,12 @@
{noreply, S}.

 %% handle_call: Tx side
-handle_call({epdg_auth_resp, Imsi, Result}, _From, State) ->
-   epdg_diameter_swm:rx_auth_response(Imsi, Result),
+handle_call({dea_auth_resp, Imsi, Result}, _From, State) ->
+   epdg_diameter_swm:rx_dea_auth_response(Imsi, Result),
{reply, ok, State};

-handle_call({epdg_auth_compl_resp, Imsi, Result}, _From, State) ->
-   epdg_diameter_swm:rx_auth_compl_response(Imsi, Result),
+handle_call({dea_auth_compl_resp, Imsi, Result}, _From, State) ->
+   epdg_diameter_swm:rx_dea_auth_compl_response(Imsi, Result),
{reply, ok, State};

 handle_call({rar, Imsi}, _From, State) ->
diff --git a/src/aaa_ue_fsm.erl b/src/aaa_ue_fsm.erl
index d2e4aad..abbe40e 100644
--- a/src/aaa_ue_fsm.erl
+++ b/src/aaa_ue_fsm.erl
@@ -42,7 +42,8 @@
 -export([start/1, stop/1]).
 -export([init/1,callback_mode/0,terminate/3]).
 -export([get_server_name_by_imsi/1, get_pid_by_imsi/1]).
--export([ev_rx_swm_auth_req/2, ev_rx_swm_reauth_answer/2, 
ev_rx_swm_auth_compl/2, ev_rx_swm_str/1, 

[M] Change in ...osmo-epdg[master]: epdg_diameter_swm: Look up epdg_ue_fsm process each time it needs to ...

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


Change subject: epdg_diameter_swm: Look up epdg_ue_fsm process each time it 
needs to be accessed
..

epdg_diameter_swm: Look up epdg_ue_fsm process each time it needs to be accessed

This allows simplifying a lot the module state, similar to what was
already done in other modules.

Change-Id: Iacdba6570bfa286d03542733911b01e3a16e9706
---
M src/epdg_diameter_swm.erl
1 file changed, 45 insertions(+), 92 deletions(-)



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

diff --git a/src/epdg_diameter_swm.erl b/src/epdg_diameter_swm.erl
index c479b44..5d7ffe2 100644
--- a/src/epdg_diameter_swm.erl
+++ b/src/epdg_diameter_swm.erl
@@ -8,14 +8,8 @@
 -include("conv.hrl").

 -record(swm_state, {
-   sessions = sets:new()
 }).

--record(swm_session, {
-   imsi   :: string(),
-   pid:: pid()
-}).
-
 -export([start_link/0]).
 -export([init/1, handle_call/3, handle_cast/2, handle_info/2]).
 -export([code_change/3, terminate/2]).
@@ -97,11 +91,10 @@
_ -> Result
end.

-handle_call({epdg_auth_req, Imsi, PdpTypeNr, Apn, EAP}, {Pid, _Tag} = _From, 
State0) ->
+handle_call({epdg_auth_req, Imsi, PdpTypeNr, Apn, EAP}, _From, State) ->
% we yet don't implement the Diameter SWm interface on the wire, we 
process the call internally:
-   {_Sess, State1} = find_or_new_swm_session(Imsi, Pid, State0),
ok = aaa_diameter_swm:rx_auth_request(Imsi, PdpTypeNr, Apn, EAP),
-   {reply, ok, State1};
+   {reply, ok, State};

 handle_call({raa, Imsi, DiaRC}, _From, State) ->
% we yet don't implement the Diameter SWm interface on the wire, we 
process the call internally:
@@ -110,91 +103,73 @@

 handle_call({epdg_auth_compl_req, Imsi, Apn}, _From, State) ->
% we yet don't implement the Diameter SWm interface on the wire, we 
process the call internally:
-   Sess = find_swm_session_by_imsi(Imsi, State),
-   case Sess of
-   #swm_session{imsi = Imsi} ->
-   Reply = aaa_diameter_swm:rx_auth_compl_request(Imsi, Apn);
-   undefined ->
-   Reply = {error,unknown_imsi}
-   end,
+   Reply = aaa_diameter_swm:rx_auth_compl_request(Imsi, Apn),
{reply, Reply, State};

 handle_call({str, Imsi}, _From, State) ->
% we yet don't implement the Diameter SWm interface on the wire, we 
process the call internally:
-   Sess = find_swm_session_by_imsi(Imsi, State),
-   case Sess of
-   #swm_session{imsi = Imsi} ->
-   Reply = aaa_diameter_swm:rx_session_termination_request(Imsi);
-   undefined ->
-   Reply = {error,unknown_imsi}
-   end,
+   Reply = aaa_diameter_swm:rx_session_termination_request(Imsi),
{reply, Reply, State};

 handle_call({asa, Imsi}, _From, State) ->
% we yet don't implement the Diameter SWm interface on the wire, we 
process the call internally:
-   Sess = find_swm_session_by_imsi(Imsi, State),
-   case Sess of
-   #swm_session{imsi = Imsi} ->
-   Reply = aaa_diameter_swm:rx_abort_session_answer(Imsi);
-   undefined ->
-   Reply = {error,unknown_imsi}
-   end,
+   Reply = aaa_diameter_swm:rx_abort_session_answer(Imsi),
{reply, Reply, State}.

-handle_cast({epdg_auth_resp, Imsi, Result}, State) ->
-   Sess = find_swm_session_by_imsi(Imsi, State),
-   case Sess of
-   #swm_session{imsi = Imsi} ->
-   epdg_ue_fsm:received_swm_auth_response(Sess#swm_session.pid, 
Result);
+handle_cast({epdg_auth_resp, ImsiStr, Result}, State) ->
+   Imsi = list_to_binary(ImsiStr),
+   case epdg_ue_fsm:get_pid_by_imsi(Imsi) of
+   Pid when is_pid(Pid) ->
+   epdg_ue_fsm:received_swm_auth_response(Pid, Result);
undefined ->
error_logger:error_report(["unknown swm_session", {module, 
?MODULE}, {imsi, Imsi}, {state, State}])
end,
{noreply, State};

-handle_cast({epdg_auth_compl_resp, Imsi, Result}, State) ->
-   Sess = find_swm_session_by_imsi(Imsi, State),
-   case Sess of
-   #swm_session{imsi = Imsi} ->
-   
epdg_ue_fsm:received_swm_auth_compl_response(Sess#swm_session.pid, Result);
+handle_cast({epdg_auth_compl_resp, ImsiStr, Result}, State) ->
+   Imsi = list_to_binary(ImsiStr),
+   case epdg_ue_fsm:get_pid_by_imsi(Imsi) of
+   Pid when is_pid(Pid) ->
+   epdg_ue_fsm:received_swm_auth_compl_response(Pid, Result);
undefined ->
error_logger:error_report(["unknown swm_session", {module, 
?MODULE}, {imsi, Imsi}, {state, State}])
end,
{noreply, State};

-handle_cast({rar, Imsi}, State) ->
-   Sess = find_swm_session_by_imsi(Imsi, State),
-   case Sess of
-   

[S] Change in osmo-trx[master]: contrib/jenkins: add --with-bladerf

2024-03-18 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36331?usp=email )


Change subject: contrib/jenkins: add --with-bladerf
..

contrib/jenkins: add --with-bladerf

Related: OS#6409
Depends: docker-playground I3c3fe95d8ebb21f7691a491144885c7deb8049a5
Change-Id: I1300aa107fd1031cf921fafc3566f0f64f9cdd72
---
M contrib/jenkins.sh
1 file changed, 12 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/31/36331/1

diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index 8adf9ff..0f762c8 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -88,6 +88,7 @@
 CONFIG="
--enable-sanitize
--enable-werror
+   --with-bladerf
--with-ipc
--with-lms
--with-mstrx

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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I1300aa107fd1031cf921fafc3566f0f64f9cdd72
Gerrit-Change-Number: 36331
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


[S] Change in osmo-trx[master]: debian/rules: make configure args diff friendly

2024-03-18 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36328?usp=email )


Change subject: debian/rules: make configure args diff friendly
..

debian/rules: make configure args diff friendly

Have one arg per line, and order alphabetically while at it.

Change-Id: I354affacb38958efe70baedc6175aeab525190a6
---
M debian/rules
1 file changed, 19 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/28/36328/1

diff --git a/debian/rules b/debian/rules
index 5795643..f2dadcc 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,7 +9,14 @@
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info

 override_dh_auto_configure:
-   dh_auto_configure -- --with-uhd --with-usrp1 --with-lms --with-ipc 
--with-systemdsystemunitdir=/lib/systemd/system --enable-manuals
+   dh_auto_configure -- \
+   --enable-manuals \
+   --with-ipc \
+   --with-lms \
+   --with-systemdsystemunitdir=/lib/systemd/system \
+   --with-uhd \
+   --with-usrp1 \
+   $(NULL)

 override_dh_strip:
dh_strip --dbg-package=osmo-trx-dbg

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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I354affacb38958efe70baedc6175aeab525190a6
Gerrit-Change-Number: 36328
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


[S] Change in osmo-trx[master]: contrib/jenkins: make configure args diff friendly

2024-03-18 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36330?usp=email )


Change subject: contrib/jenkins: make configure args diff friendly
..

contrib/jenkins: make configure args diff friendly

Change-Id: I049af384eccdb6f8e5b305ca35de106eeaca3fa8
---
M contrib/jenkins.sh
1 file changed, 19 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/30/36330/1

diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index 990e6f4..8adf9ff 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -85,7 +85,16 @@
 export LD_LIBRARY_PATH="$inst/lib"
 export PATH="$inst/bin:$PATH"

-CONFIG="--enable-sanitize --enable-werror --with-uhd --with-usrp1 --with-lms 
--with-ipc --with-mstrx $INSTR"
+CONFIG="
+   --enable-sanitize
+   --enable-werror
+   --with-ipc
+   --with-lms
+   --with-mstrx
+   --with-uhd
+   --with-usrp1
+   $INSTR
+"

 # Additional configure options and depends
 if [ "$WITH_MANUALS" = "1" ]; then

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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I049af384eccdb6f8e5b305ca35de106eeaca3fa8
Gerrit-Change-Number: 36330
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


[S] Change in osmo-trx[master]: debian: add osmo-trx-ms-blade

2024-03-18 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36329?usp=email )


Change subject: debian: add osmo-trx-ms-blade
..

debian: add osmo-trx-ms-blade

Related: OS#6409
Change-Id: I85d24355975f292610bcde61a8917aec852043ca
---
M debian/control
A debian/osmo-trx-ms-blade.install
M debian/rules
3 files changed, 34 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/29/36329/1

diff --git a/debian/control b/debian/control
index b1bb6c0..338e89a 100644
--- a/debian/control
+++ b/debian/control
@@ -15,7 +15,8 @@
libusrp-dev,
liblimesuite-dev,
libosmocore-dev (>= 1.9.0),
-   osmo-gsm-manuals-dev (>= 1.5.0)
+   osmo-gsm-manuals-dev (>= 1.5.0),
+   libbladerf-dev
 Standards-Version: 3.9.6
 Vcs-Browser: https://gitea.osmocom.org/cellular-infrastructure/osmo-trx
 Vcs-Git: https://gitea.osmocom.org/cellular-infrastructure/osmo-trx
@@ -110,6 +111,25 @@
  between different telecommunication associations for developing new
  generations of mobile phone networks. (post-2G/GSM)

+Package: osmo-trx-ms-blade
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: MS side transceiver (bladeRF)
+ OsmoTRX is a software-defined radio transceiver that implements the Layer 1
+ physical layer of a BTS comprising the following 3GPP specifications:
+ .
+ TS 05.01 "Physical layer on the radio path"
+ TS 05.02 "Multiplexing and Multiple Access on the Radio Path"
+ TS 05.04 "Modulation"
+ TS 05.10 "Radio subsystem synchronization"
+ .
+ In this context, BTS is "Base transceiver station". It's the stations that
+ connect mobile phones to the mobile network.
+ .
+ 3GPP is the "3rd Generation Partnership Project" which is the collaboration
+ between different telecommunication associations for developing new
+ generations of mobile phone networks. (post-2G/GSM)
+
 Package: osmo-trx-doc
 Architecture: all
 Section: doc
diff --git a/debian/osmo-trx-ms-blade.install b/debian/osmo-trx-ms-blade.install
new file mode 100644
index 000..0a3f163
--- /dev/null
+++ b/debian/osmo-trx-ms-blade.install
@@ -0,0 +1 @@
+/usr/bin/osmo-trx-ms-blade
diff --git a/debian/rules b/debian/rules
index f2dadcc..d9e4949 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,8 +11,10 @@
 override_dh_auto_configure:
dh_auto_configure -- \
--enable-manuals \
+   --with-bladerf \
--with-ipc \
--with-lms \
+   --with-mstrx \
--with-systemdsystemunitdir=/lib/systemd/system \
--with-uhd \
--with-usrp1 \

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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I85d24355975f292610bcde61a8917aec852043ca
Gerrit-Change-Number: 36329
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


[S] Change in osmo-trx[master]: gitignore: add .version

2024-03-18 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/36327?usp=email )


Change subject: gitignore: add .version
..

gitignore: add .version

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



  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/27/36327/1

diff --git a/.gitignore b/.gitignore
index 581b08f..fc567db 100644
--- a/.gitignore
+++ b/.gitignore
@@ -38,6 +38,7 @@
 .deps
 .libs
 .dirstamp
+.version
 *~
 Makefile
 config.log

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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Ib75781b5d473921b42936e4d3c441e6a520b9108
Gerrit-Change-Number: 36327
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


  1   2   >