Attention is currently required from: neels.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/32576 )
Change subject: vty: move struct vty_parent_node to private API
......................................................................
Patch Set 2: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/32576
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id2070f03b09feea966c5342361d409551e557d38
Gerrit-Change-Number: 32576
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 03 May 2023 08:22:33 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: fixeria.
dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/32532 )
Change subject: pySim-shell: fix compatibility problem with cmd2 >= 2.0.0 (Settable)
......................................................................
Patch Set 8:
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/pysim/+/32532/comment/54f40471_822d55fd
PS8, Line 11: Older versions will ignore the settable_object parameter
> The minimum cmd2 version that works with this patchset applied is 2.0.0 :/ […]
This patch should of course not break support for cmd2 1.5 I was hoping that the jenkins build job would cover this but it looks like I have to test this manually now ;-(
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/32532
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I38efe4702277ee092a5542d7d659df08cb0adeff
Gerrit-Change-Number: 32532
Gerrit-PatchSet: 8
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 03 May 2023 08:10:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
dexter has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/32423 )
Change subject: er_ccu_l1_if: use one ccu_desr per timeslot
......................................................................
er_ccu_l1_if: use one ccu_desr per timeslot
At the moment only allocate one CCU descriptor and use it as context for
the whole TRX. This is fine when running with one PDCH only but as soon
as multiple PDCHs are used the CCU descriptor gets messed up. Let's fix
this by introducing a TRX descriptor that contains an array of 8 CCU
descriptors, one for each timeslot.
Related: OS#6022
Change-Id: I09a51f34ce0edef79a797c4686c7b1d27c376e49
---
M src/ericsson-rbs/er_ccu_descr.h
M src/ericsson-rbs/er_ccu_l1_if.c
2 files changed, 61 insertions(+), 24 deletions(-)
Approvals:
fixeria: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/src/ericsson-rbs/er_ccu_descr.h b/src/ericsson-rbs/er_ccu_descr.h
index 0b56cc0..9fe1aab 100644
--- a/src/ericsson-rbs/er_ccu_descr.h
+++ b/src/ericsson-rbs/er_ccu_descr.h
@@ -47,3 +47,7 @@
};
+
+struct er_trx_descr {
+ struct er_ccu_descr ts_ccu_descr[8];
+};
diff --git a/src/ericsson-rbs/er_ccu_l1_if.c b/src/ericsson-rbs/er_ccu_l1_if.c
index b7dd102..0fe30b2 100644
--- a/src/ericsson-rbs/er_ccu_l1_if.c
+++ b/src/ericsson-rbs/er_ccu_l1_if.c
@@ -372,18 +372,22 @@
int l1if_pdch_req(void *obj, uint8_t ts, int is_ptcch, uint32_t fn,
uint16_t arfcn, uint8_t block_nr, uint8_t *data, uint8_t len)
{
- struct er_ccu_descr *ccu_descr = obj;
+ struct er_trx_descr *trx_descr = obj;
+ struct er_ccu_descr *ccu_descr;
struct er_gprs_trau_frame trau_frame;
ubit_t trau_frame_encoded[ER_GPRS_TRAU_FRAME_LEN_64K];
struct gprs_rlcmac_bts *bts;
int rc;
/* Make sure that the CCU is synchronized and connected. */
- if (!ccu_descr) {
- LOGP(DL1IF, LOGL_ERROR, "PCU-DATA-IND: PDCH(ts=%u, arfcn=%u) no CCU context, tossing MAC block...\n",
+ if (!trx_descr) {
+ LOGP(DL1IF, LOGL_ERROR, "PCU-DATA-IND: PDCH(ts=%u, arfcn=%u) no TRX context, tossing MAC block...\n",
ts, arfcn);
return -EINVAL;
}
+
+ ccu_descr = &trx_descr->ts_ccu_descr[ts];
+
if (!ccu_descr->link.ccu_connected) {
LOGPL1IF(ccu_descr, LOGL_NOTICE, "PCU-DATA-IND", "CCU not connected, tossing MAC block...\n");
return -EINVAL;
@@ -450,46 +454,56 @@
void *l1if_open_pdch(uint8_t bts_nr, uint8_t trx_no, uint32_t hlayer1, struct gsmtap_inst *gsmtap)
{
- struct er_ccu_descr *ccu_descr;
+ struct er_trx_descr *trx_descr;
+ unsigned int i;
/* Note: We do not have enough information to really open anything at
- * this point. We will just create the CCU context. */
+ * this point. We will just create the TRX context and fill it wit basic
+ * CCU context (one for each TS) */
- ccu_descr = talloc_zero(tall_pcu_ctx, struct er_ccu_descr);
- OSMO_ASSERT(ccu_descr);
- ccu_descr->er_ccu_rx_cb = er_ccu_rx_cb;
- ccu_descr->er_ccu_empty_cb = er_ccu_empty_cb;
- ccu_descr->pcu.trx_no = trx_no;
- ccu_descr->pcu.bts_nr = bts_nr;
+ trx_descr = talloc_zero(tall_pcu_ctx, struct er_trx_descr);
+ OSMO_ASSERT(trx_descr);
- return ccu_descr;
+ for (i = 0; i < ARRAY_SIZE(trx_descr->ts_ccu_descr); i++) {
+ trx_descr->ts_ccu_descr[i].er_ccu_rx_cb = er_ccu_rx_cb;
+ trx_descr->ts_ccu_descr[i].er_ccu_empty_cb = er_ccu_empty_cb;
+ trx_descr->ts_ccu_descr[i].pcu.trx_no = trx_no;
+ trx_descr->ts_ccu_descr[i].pcu.bts_nr = bts_nr;
+ trx_descr->ts_ccu_descr[i].pcu.ts = i;
+ }
+
+ return trx_descr;
}
int l1if_close_pdch(void *obj)
{
- struct er_ccu_descr *ccu_descr = obj;
+ struct er_trx_descr *trx_descr = obj;
+ unsigned int i;
- if (!ccu_descr) {
- LOGP(DL1IF, LOGL_ERROR, "PCU-DATA-IND: no CCU context, cannot close unknown PDCH...\n");
+ if (!trx_descr) {
+ LOGP(DL1IF, LOGL_ERROR, "PCU-DATA-IND: no TRX context, cannot close unknown TRX...\n");
return -EINVAL;
}
- er_ccu_if_close(ccu_descr);
- talloc_free(ccu_descr);
+ for (i = 0; i < ARRAY_SIZE(trx_descr->ts_ccu_descr); i++)
+ er_ccu_if_close(&trx_descr->ts_ccu_descr[i]);
+
+ talloc_free(trx_descr);
return 0;
}
int l1if_connect_pdch(void *obj, uint8_t ts)
{
- struct er_ccu_descr *ccu_descr = obj;
+ struct er_trx_descr *trx_descr = obj;
+ struct er_ccu_descr *ccu_descr;
int rc;
- if (!ccu_descr) {
- LOGP(DL1IF, LOGL_ERROR, "SETUP: PDCH(ts=%u) no CCU context, PDCH never opened before?\n", ts);
+ if (!trx_descr) {
+ LOGP(DL1IF, LOGL_ERROR, "SETUP: PDCH(ts=%u) no CCU context, TRX never opened before?\n", ts);
return -EINVAL;
}
- ccu_descr->pcu.ts = ts;
+ ccu_descr = &trx_descr->ts_ccu_descr[ts];
rc = pcu_l1if_get_e1_ccu_conn_pars(&ccu_descr->e1_conn_pars, ccu_descr->pcu.bts_nr, ccu_descr->pcu.trx_no,
ccu_descr->pcu.ts);
@@ -507,13 +521,16 @@
int l1if_disconnect_pdch(void *obj, uint8_t ts)
{
- struct er_ccu_descr *ccu_descr = obj;
+ struct er_trx_descr *trx_descr = obj;
+ struct er_ccu_descr *ccu_descr;
- if (!ccu_descr) {
- LOGP(DL1IF, LOGL_ERROR, "SETUP: PDCH(ts=%u) no CCU context, PDCH never opened before?\n", ts);
+ if (!trx_descr) {
+ LOGP(DL1IF, LOGL_ERROR, "SETUP: PDCH(ts=%u) no TRX context, TRX never opened before?\n", ts);
return -EINVAL;
}
+ ccu_descr = &trx_descr->ts_ccu_descr[ts];
+
er_ccu_if_close(ccu_descr);
return 0;
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/32423
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I09a51f34ce0edef79a797c4686c7b1d27c376e49
Gerrit-Change-Number: 32423
Gerrit-PatchSet: 5
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: keith <keith(a)rhizomatica.org>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32331 )
Change subject: sccp: set titan.SCCP commit: use fix for localRef == 0
......................................................................
sccp: set titan.SCCP commit: use fix for localRef == 0
Use this fix in our tests:
https://github.com/osmocom/titan.ProtocolEmulations.SCCP/commit/17a894fc662…
This allows osmo-hnbgw to start out with SCCP local reference == 0
without that causing test failure.
'Related' patch below happens to have that effect, and it was *really*
hard to find out why th the tests failed. It seemed like I had messed up
osmo-hnbgw, but then I found out it wasn't my fault at all.
Related: Iea1824f1c586723d989c80a909bae16bd2866e08 osmo-hnbgw
Change-Id: Idb3f2398c934a1d785e8ee7913c12c0f289c1f18
---
M deps/Makefile
1 file changed, 21 insertions(+), 1 deletion(-)
Approvals:
neels: Looks good to me, approved
fixeria: Looks good to me, but someone else must approve
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/deps/Makefile b/deps/Makefile
index 277bd67..9bdfb8e 100644
--- a/deps/Makefile
+++ b/deps/Makefile
@@ -86,7 +86,7 @@
# file changed.
titan.Libraries.TCCUsefulFunctions_commit= R.35.B-6-gb3687da
titan.ProtocolEmulations.M3UA_commit= f086e78d74defa044d864f17adaad9433fedc961
-titan.ProtocolEmulations.SCCP_commit= R.7.A-11-gd4b7a6d
+titan.ProtocolEmulations.SCCP_commit= 17a894fc6620a0df11d0d98c897fb66168276b16
titan.ProtocolModules.BSSAPP_v7.3.0_commit= R.2.A-4-g20cfaf8
titan.ProtocolModules.BSSGP_v13.0.0_commit= e97d92a8b66bec399babea52f593771b76cb175a
titan.ProtocolModules.BSSMAP_commit= 24f967b2f77bfdd2e6eabf1e82fa76239095f772
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32331
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: Idb3f2398c934a1d785e8ee7913c12c0f289c1f18
Gerrit-Change-Number: 32331
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/32577 )
Change subject: gsm: add osmo_mobile_identity_decode_from_l3_buf()
......................................................................
gsm: add osmo_mobile_identity_decode_from_l3_buf()
We have osmo_mobile_identity_decode_from_l3(), which takes a msgb as
argument, and decodes msg->l3h. Not all callers have their data in this
form. Offer a more flexible API for the same decoding.
For example, before the new function, osmo-hnbgw, which extracts a NAS
PDU from asn.1 packed data for CN pooling, would allocate a new msgb and
copy the NAS data just to pass a data pointer as argument.
Related: SYS#6412
Change-Id: I9bd99ccd01f0eedc091fe51687ff92ae1fdff60b
---
M include/osmocom/gsm/gsm48.h
M src/gsm/gsm48.c
M src/gsm/libosmogsm.map
3 files changed, 50 insertions(+), 12 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/77/32577/1
diff --git a/include/osmocom/gsm/gsm48.h b/include/osmocom/gsm/gsm48.h
index 93a9e21..8323c72 100644
--- a/include/osmocom/gsm/gsm48.h
+++ b/include/osmocom/gsm/gsm48.h
@@ -96,6 +96,8 @@
int osmo_mobile_identity_cmp(const struct osmo_mobile_identity *a, const struct osmo_mobile_identity *b);
int osmo_mobile_identity_decode(struct osmo_mobile_identity *mi, const uint8_t *mi_data, uint8_t mi_len,
bool allow_hex);
+int osmo_mobile_identity_decode_from_l3_buf(struct osmo_mobile_identity *mi, const uint8_t *l3_data, size_t l3_len,
+ bool allow_hex);
int osmo_mobile_identity_decode_from_l3(struct osmo_mobile_identity *mi, struct msgb *msg, bool allow_hex);
int osmo_mobile_identity_encoded_len(const struct osmo_mobile_identity *mi, int *mi_digits);
int osmo_mobile_identity_encode_buf(uint8_t *buf, size_t buflen, const struct osmo_mobile_identity *mi, bool allow_hex);
diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c
index dee6813..df455ac 100644
--- a/src/gsm/gsm48.c
+++ b/src/gsm/gsm48.c
@@ -863,11 +863,13 @@
* osmo_mobile_identity.
*
* \param[out] mi Return buffer for decoded Mobile Identity.
- * \param[in] msg The Complete Layer 3 message to extract from (LU, CM Service Req or Paging Resp).
+ * \param[in] l3_data The Complete Layer 3 message to extract from (LU, CM Service Req or Paging Resp).
+ * \param[in] l3_len Length of l3_data in bytes.
* \returns 0 on success, negative on error: return codes as defined in osmo_mobile_identity_decode(), or
* -ENOTSUP = not a Complete Layer 3 message,
*/
-int osmo_mobile_identity_decode_from_l3(struct osmo_mobile_identity *mi, struct msgb *msg, bool allow_hex)
+int osmo_mobile_identity_decode_from_l3_buf(struct osmo_mobile_identity *mi, const uint8_t *l3_data, size_t l3_len,
+ bool allow_hex)
{
const struct gsm48_hdr *gh;
int8_t pdisc = 0;
@@ -886,10 +888,10 @@
.tmsi = GSM_RESERVED_TMSI,
};
- if (msgb_l3len(msg) < sizeof(*gh))
+ if (l3_len < sizeof(*gh))
return -EBADMSG;
- gh = msgb_l3(msg);
+ gh = (void *)l3_data;
pdisc = gsm48_hdr_pdisc(gh);
mtype = gsm48_hdr_msg_type(gh);
@@ -899,12 +901,12 @@
switch (mtype) {
case GSM48_MT_MM_LOC_UPD_REQUEST:
/* First make sure that lu-> can be dereferenced */
- if (msgb_l3len(msg) < sizeof(*gh) + sizeof(*lu))
+ if (l3_len < sizeof(*gh) + sizeof(*lu))
return -EBADMSG;
/* Now we know there is enough msgb data to read a lu->mi_len, so also check that */
lu = (struct gsm48_loc_upd_req*)gh->data;
- if (msgb_l3len(msg) < sizeof(*gh) + sizeof(*lu) + lu->mi_len)
+ if (l3_len < sizeof(*gh) + sizeof(*lu) + lu->mi_len)
return -EBADMSG;
mi_data = lu->mi;
mi_len = lu->mi_len;
@@ -914,7 +916,7 @@
case GSM48_MT_MM_CM_REEST_REQ:
/* Unfortunately in Phase1 the Classmark2 length is variable, so we cannot
* just use gsm48_service_request struct, and need to parse it manually. */
- if (msgb_l3len(msg) < sizeof(*gh) + 2)
+ if (l3_len < sizeof(*gh) + 2)
return -EBADMSG;
cm2_len = gh->data[1];
@@ -922,7 +924,7 @@
goto got_cm2;
case GSM48_MT_MM_IMSI_DETACH_IND:
- if (msgb_l3len(msg) < sizeof(*gh) + sizeof(*idi))
+ if (l3_len < sizeof(*gh) + sizeof(*idi))
return -EBADMSG;
idi = (struct gsm48_imsi_detach_ind*) gh->data;
mi_data = idi->mi;
@@ -930,7 +932,7 @@
goto got_mi;
case GSM48_MT_MM_ID_RESP:
- if (msgb_l3len(msg) < sizeof(*gh) + 2)
+ if (l3_len < sizeof(*gh) + 2)
return -EBADMSG;
mi_data = gh->data+1;
mi_len = gh->data[0];
@@ -945,7 +947,7 @@
switch (mtype) {
case GSM48_MT_RR_PAG_RESP:
- if (msgb_l3len(msg) < sizeof(*gh) + sizeof(*paging_response))
+ if (l3_len < sizeof(*gh) + sizeof(*paging_response))
return -EBADMSG;
paging_response = (struct gsm48_pag_resp*)gh->data;
cm2_len = paging_response->cm2_len;
@@ -964,7 +966,7 @@
/* MI (Mobile Identity) LV follows the Classmark2 */
/* There must be at least a mi_len byte after the CM2 */
- if (cm2_buf + cm2_len + 1 > msg->tail)
+ if (cm2_buf + cm2_len + 1 > l3_data + l3_len)
return -EBADMSG;
mi_start = cm2_buf + cm2_len;
@@ -973,12 +975,27 @@
got_mi:
/* mi_data points at the start of the Mobile Identity coding of mi_len bytes */
- if (mi_data + mi_len > msg->tail)
+ if (mi_data + mi_len > l3_data + l3_len)
return -EBADMSG;
return osmo_mobile_identity_decode(mi, mi_data, mi_len, allow_hex);
}
+/*! Extract Mobile Identity from a Complete Layer 3 message.
+ *
+ * Determine the Mobile Identity data and call osmo_mobile_identity_decode() to return a decoded struct
+ * osmo_mobile_identity.
+ *
+ * \param[out] mi Return buffer for decoded Mobile Identity.
+ * \param[in] msg The Complete Layer 3 message to extract from (LU, CM Service Req or Paging Resp).
+ * \returns 0 on success, negative on error: return codes as defined in osmo_mobile_identity_decode(), or
+ * -ENOTSUP = not a Complete Layer 3 message,
+ */
+int osmo_mobile_identity_decode_from_l3(struct osmo_mobile_identity *mi, struct msgb *msg, bool allow_hex)
+{
+ return osmo_mobile_identity_decode_from_l3_buf(mi, msgb_l3(msg), msgb_l3len(msg), allow_hex);
+}
+
/*! Return a human readable representation of a struct osmo_mobile_identity.
* Write a string like "IMSI-1234567", "TMSI-0x1234ABCD" or "NONE", "NULL".
* \param[out] buf String buffer to write to.
diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map
index 6795c57..0018e1c 100644
--- a/src/gsm/libosmogsm.map
+++ b/src/gsm/libosmogsm.map
@@ -391,6 +391,7 @@
osmo_mobile_identity_to_str_c;
osmo_mobile_identity_cmp;
osmo_mobile_identity_decode;
+osmo_mobile_identity_decode_from_l3_buf;
osmo_mobile_identity_decode_from_l3;
osmo_mobile_identity_encoded_len;
osmo_mobile_identity_encode_buf;
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/32577
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I9bd99ccd01f0eedc091fe51687ff92ae1fdff60b
Gerrit-Change-Number: 32577
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newchange