Attention is currently required from: fixeria.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/34514?usp=email )
Change subject: modem: grr: implement RACH.req retransmission
......................................................................
Patch Set 2: Code-Review+1
(2 comments)
File src/host/layer23/src/modem/grr.c:
https://gerrit.osmocom.org/c/osmocom-bb/+/34514/comment/ca25b113_7d402c9f
PS2, Line 470: rr->n_chan_req = GRR_PACKET_ACCESS_MAX_CHAN_REQ;
add "pending" word somewhere in the variable field? n_chan_req_pending.
https://gerrit.osmocom.org/c/osmocom-bb/+/34514/comment/ff53a191_4ba95595
PS2, Line 659: static void grr_st_packet_access_action(struct osmo_fsm_inst *fi,
I think it's the first place I see we add the "action" keyword, I was first confused about what was this.
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34514?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Iab6d9147f6e0aeb99239affacf318a3897fd6ffe
Gerrit-Change-Number: 34514
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 22 Sep 2023 23:12:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
falconia has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/34451?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: SMS over GSUP: handle READY-FOR-SM.req from MSCs
......................................................................
SMS over GSUP: handle READY-FOR-SM.req from MSCs
When an MS indicates that it is ready to receive MT SMS, the MSC will
send us a READY-FOR-SM.req message. Handle it by sending copies of
the same message to all connected SMSCs and returning OK result
to the MS that indicates its ready status.
Related: OS#6135
Change-Id: I731545a3a0d0804289e24a7769e13bfd3f645132
---
M include/osmocom/hlr/hlr_sms.h
M src/hlr.c
M src/hlr_sms.c
3 files changed, 75 insertions(+), 0 deletions(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/include/osmocom/hlr/hlr_sms.h b/include/osmocom/hlr/hlr_sms.h
index e6e476e..01fc231 100644
--- a/include/osmocom/hlr/hlr_sms.h
+++ b/include/osmocom/hlr/hlr_sms.h
@@ -30,3 +30,4 @@
void forward_mo_sms(struct osmo_gsup_req *req);
void forward_mt_sms(struct osmo_gsup_req *req);
+void rx_ready_for_sm_req(struct osmo_gsup_req *req);
diff --git a/src/hlr.c b/src/hlr.c
index eae9e84..8ad3dfc 100644
--- a/src/hlr.c
+++ b/src/hlr.c
@@ -563,6 +563,9 @@
case OSMO_GSUP_MSGT_MT_FORWARD_SM_REQUEST:
forward_mt_sms(req);
break;
+ case OSMO_GSUP_MSGT_READY_FOR_SM_REQUEST:
+ rx_ready_for_sm_req(req);
+ break;
default:
LOGP(DMAIN, LOGL_DEBUG, "Unhandled GSUP message type %s\n",
osmo_gsup_message_type_name(req->gsup.message_type));
diff --git a/src/hlr_sms.c b/src/hlr_sms.c
index c8c8e49..d923e90 100644
--- a/src/hlr_sms.c
+++ b/src/hlr_sms.c
@@ -218,3 +218,59 @@
strlen(subscr.vlr_number) + 1);
osmo_gsup_forward_to_local_peer(req->cb_data, &dest_peer, req, NULL);
}
+
+/***********************************************************************
+ * READY-FOR-SM handling
+ *
+ * An MSC indicates that an MS is ready to receive messages. If one
+ * or more SMSCs have previously tried to send MT SMS to this MS and
+ * failed, we should pass this READY-FOR-SM message to them so they
+ * can resend their queued SMS right away. But which SMSC do we
+ * forward the message to? 3GPP specs call for a complicated system
+ * where the HLR remembers which SMSCs have tried and failed to deliver
+ * MT SMS, and those SMSCs then get notified - but that design is too
+ * much complexity for the current state of Osmocom. So we keep it
+ * simple: we iterate over all configured SMSCs and forward a copy
+ * of the READY-FOR-SM.req message to each.
+ *
+ * Routing of responses is another problem: the MSC that sent
+ * READY-FOR-SM.req expects only one response, and one can even argue
+ * that the operation is a "success" from the perspective of the MS
+ * irrespective of whether each given SMSC handled the notification
+ * successfully or not. Hence our approach: we always return success
+ * to the MS, and when we forward copies of READY-FOR-SM.req to SMSCs,
+ * we list the HLR as the message source - this way SMSC responses
+ * will terminate at this HLR and won't be forwarded to the MSC.
+ ***********************************************************************/
+
+static void forward_req_copy_to_smsc(const struct osmo_gsup_req *req,
+ const struct hlr_smsc *smsc)
+{
+ const char *my_ipa_name = g_hlr->gsup_unit_name.serno;
+ struct osmo_gsup_message forward = req->gsup;
+ struct osmo_ipa_name smsc_ipa_name;
+
+ /* set the source to this HLR */
+ forward.source_name = (const uint8_t *) my_ipa_name;
+ forward.source_name_len = strlen(my_ipa_name) + 1;
+
+ /* send it off */
+ LOG_GSUP_REQ(req, LOGL_INFO, "Forwarding source-reset copy to %s\n",
+ smsc->name);
+ osmo_ipa_name_set(&smsc_ipa_name, (const uint8_t *) smsc->name,
+ strlen(smsc->name) + 1);
+ osmo_gsup_enc_send_to_ipa_name(g_hlr->gs, &smsc_ipa_name, &forward);
+}
+
+void rx_ready_for_sm_req(struct osmo_gsup_req *req)
+{
+ struct hlr_smsc *smsc;
+
+ /* fan request msg out to all SMSCs */
+ llist_for_each_entry(smsc, &g_hlr->smsc_list, list)
+ forward_req_copy_to_smsc(req, smsc);
+
+ /* send OK response to the MSC and the MS */
+ osmo_gsup_req_respond_msgt(req, OSMO_GSUP_MSGT_READY_FOR_SM_RESULT,
+ true);
+}
--
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/34451?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: I731545a3a0d0804289e24a7769e13bfd3f645132
Gerrit-Change-Number: 34451
Gerrit-PatchSet: 4
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
falconia has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/34450?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: SMS over GSUP: implement forwarding of MT SMS
......................................................................
SMS over GSUP: implement forwarding of MT SMS
When an SMSC tries to deliver an SM to a subscriber, it will send us
an MT-forwardSM.req GSUP message. We look up the subscriber by IMSI
and see if they are attached to a VLR. If the subscriber is attached,
we forward the message to the MSC/VLR, otherwise return an error
to the SMSC.
Related: OS#6135
Change-Id: Ib3551bf7839690606c677461758c5cfef5f0aa7b
---
M include/osmocom/hlr/hlr_sms.h
M src/hlr.c
M src/hlr_sms.c
3 files changed, 48 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/include/osmocom/hlr/hlr_sms.h b/include/osmocom/hlr/hlr_sms.h
index 727e408..e6e476e 100644
--- a/include/osmocom/hlr/hlr_sms.h
+++ b/include/osmocom/hlr/hlr_sms.h
@@ -29,3 +29,4 @@
void smsc_route_free(struct hlr_smsc_route *rt);
void forward_mo_sms(struct osmo_gsup_req *req);
+void forward_mt_sms(struct osmo_gsup_req *req);
diff --git a/src/hlr.c b/src/hlr.c
index 501eabc..eae9e84 100644
--- a/src/hlr.c
+++ b/src/hlr.c
@@ -560,6 +560,9 @@
case OSMO_GSUP_MSGT_MO_FORWARD_SM_REQUEST:
forward_mo_sms(req);
break;
+ case OSMO_GSUP_MSGT_MT_FORWARD_SM_REQUEST:
+ forward_mt_sms(req);
+ break;
default:
LOGP(DMAIN, LOGL_DEBUG, "Unhandled GSUP message type %s\n",
osmo_gsup_message_type_name(req->gsup.message_type));
diff --git a/src/hlr_sms.c b/src/hlr_sms.c
index 672d6c9..c8c8e49 100644
--- a/src/hlr_sms.c
+++ b/src/hlr_sms.c
@@ -190,3 +190,31 @@
strlen(smsc->name) + 1);
osmo_gsup_forward_to_local_peer(req->cb_data, &dest_peer, req, NULL);
}
+
+/***********************************************************************
+ * forwarding of MT SMS from SMSCs to MSC/VLR based on IMSI
+ ***********************************************************************/
+
+void forward_mt_sms(struct osmo_gsup_req *req)
+{
+ struct hlr_subscriber subscr;
+ struct osmo_cni_peer_id dest_peer;
+ int rc;
+
+ rc = db_subscr_get_by_imsi(g_hlr->dbc, req->gsup.imsi, &subscr);
+ if (rc < 0) {
+ osmo_gsup_req_respond_err(req, GMM_CAUSE_IMSI_UNKNOWN,
+ "IMSI unknown");
+ return;
+ }
+ /* is this subscriber currently attached to a VLR? */
+ if (!subscr.vlr_number[0]) {
+ osmo_gsup_req_respond_err(req, GMM_CAUSE_IMPL_DETACHED,
+ "subscriber not attached to a VLR");
+ return;
+ }
+ osmo_cni_peer_id_set(&dest_peer, OSMO_CNI_PEER_ID_IPA_NAME,
+ (const uint8_t *) subscr.vlr_number,
+ strlen(subscr.vlr_number) + 1);
+ osmo_gsup_forward_to_local_peer(req->cb_data, &dest_peer, req, NULL);
+}
--
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/34450?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: Ib3551bf7839690606c677461758c5cfef5f0aa7b
Gerrit-Change-Number: 34450
Gerrit-PatchSet: 4
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: fixeria.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-gprs/+/34512?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: rlcmac: deal with RACH retransmissions (drop rach_req_ra)
......................................................................
rlcmac: deal with RACH retransmissions (drop rach_req_ra)
The RA value does change during RACH retransmissions, so we cannot
expect a specific value in gprs_rlcmac_handle_ccch_imm_ass_ul_tbf()
anymore. Offload checking it to the lower layers.
* Rename submit_rach_req() to submit_packet_access_req().
* Get rid of gen_chan_req(), indicate only the access cause.
Ideally, we should also rename the OSMO_GPRS_RLCMAC_L1CTL_RACH
to something like OSMO_GPRS_RLCMAC_L1CTL_PKT_CHAN_ACCESS, but
let's better do this separately.
Change-Id: If0de3ed86b1e2897d70183f3b0f4fbfd7d2bda80
Related: osmocom-bb.git Iab6d9147f6e0aeb99239affacf318a3897fd6ffe
Related: OS#5500, OS#6131
---
M include/osmocom/gprs/rlcmac/tbf_ul_ass_fsm.h
M src/rlcmac/rlcmac.c
M src/rlcmac/tbf_ul_ass_fsm.c
M tests/rlcmac/rlcmac_prim_test.err
M tests/rlcmac/rlcmac_prim_test.ok
5 files changed, 71 insertions(+), 54 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/12/34512/3
--
To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/34512?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: If0de3ed86b1e2897d70183f3b0f4fbfd7d2bda80
Gerrit-Change-Number: 34512
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset