laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/36207?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: rename hnbgw_peek_l3 to hnbgw_peek_l3_ul as it's uplink only
......................................................................
rename hnbgw_peek_l3 to hnbgw_peek_l3_ul as it's uplink only
Let's not make the functions appear more generic than they are: They
all explicitly only support uplink so far.
Change-Id: I7db0d933a8f17f8c410141f43dab12b8c19fc8ae
---
M include/osmocom/hnbgw/hnbgw.h
M src/osmo-hnbgw/hnbgw_l3.c
M src/osmo-hnbgw/hnbgw_rua.c
3 files changed, 22 insertions(+), 10 deletions(-)
Approvals:
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
osmith: Looks good to me, approved
diff --git a/include/osmocom/hnbgw/hnbgw.h b/include/osmocom/hnbgw/hnbgw.h
index 008f49f..069dca2 100644
--- a/include/osmocom/hnbgw/hnbgw.h
+++ b/include/osmocom/hnbgw/hnbgw.h
@@ -429,4 +429,4 @@
struct msgb *hnbgw_ranap_msg_alloc(const char *name);
-int hnbgw_peek_l3(struct hnbgw_context_map *map, struct msgb *ranap_msg);
+int hnbgw_peek_l3_ul(struct hnbgw_context_map *map, struct msgb *ranap_msg);
diff --git a/src/osmo-hnbgw/hnbgw_l3.c b/src/osmo-hnbgw/hnbgw_l3.c
index a6b48ce..1fd3398 100644
--- a/src/osmo-hnbgw/hnbgw_l3.c
+++ b/src/osmo-hnbgw/hnbgw_l3.c
@@ -156,8 +156,8 @@
return 0;
}
-static int peek_l3_nas(struct hnbgw_context_map *map, const uint8_t *nas_pdu, size_t len,
- const struct osmo_plmn_id *local_plmn)
+static int peek_l3_ul_nas(struct hnbgw_context_map *map, const uint8_t *nas_pdu, size_t len,
+ const struct osmo_plmn_id *local_plmn)
{
const struct gsm48_hdr *gh;
int8_t pdisc;
@@ -277,7 +277,7 @@
return 0;
}
-static int peek_l3_initial_ue(struct hnbgw_context_map *map, const RANAP_InitialUE_MessageIEs_t *ies)
+static int peek_l3_ul_initial_ue(struct hnbgw_context_map *map, const RANAP_InitialUE_MessageIEs_t *ies)
{
struct osmo_plmn_id local_plmn;
@@ -293,12 +293,12 @@
osmo_plmn_from_bcd(ies->lai.pLMNidentity.buf, &local_plmn);
}
- return peek_l3_nas(map, ies->nas_pdu.buf, ies->nas_pdu.size, &local_plmn);
+ return peek_l3_ul_nas(map, ies->nas_pdu.buf, ies->nas_pdu.size, &local_plmn);
}
-/* Extract a Layer 3 message (NAS PDU) from the RANAP message, and put the info obtained in map->l3. This is relevant
- * for CN pooling, to decide which CN link to map the RUA context to. */
-int hnbgw_peek_l3(struct hnbgw_context_map *map, struct msgb *ranap_msg)
+/* Extract a Layer 3 message (NAS PDU) from the uplink RANAP message, and put the info obtained in map->l3.
+ * This is relevant for CN pooling, to decide which CN link to map the RUA context to. */
+int hnbgw_peek_l3_ul(struct hnbgw_context_map *map, struct msgb *ranap_msg)
{
ranap_message *message = hnbgw_decode_ranap_co(ranap_msg);
if (!message) {
@@ -308,7 +308,7 @@
switch (message->procedureCode) {
case RANAP_ProcedureCode_id_InitialUE_Message:
- return peek_l3_initial_ue(map, &message->msg.initialUE_MessageIEs);
+ return peek_l3_ul_initial_ue(map, &message->msg.initialUE_MessageIEs);
default:
LOGP(DCN, LOGL_ERROR, "unexpected RANAP PDU in RUA Connect message: %s\n",
get_value_string(ranap_procedure_code_vals, message->procedureCode));
diff --git a/src/osmo-hnbgw/hnbgw_rua.c b/src/osmo-hnbgw/hnbgw_rua.c
index ae518c0..5576fa4 100644
--- a/src/osmo-hnbgw/hnbgw_rua.c
+++ b/src/osmo-hnbgw/hnbgw_rua.c
@@ -194,7 +194,7 @@
map = context_map_alloc(hnb, rua_ctx_id, is_ps);
OSMO_ASSERT(map);
- if (hnbgw_peek_l3(map, ranap_msg))
+ if (hnbgw_peek_l3_ul(map, ranap_msg))
LOGP(DCN, LOGL_NOTICE, "Failed to extract Mobile Identity from RUA Connect message's RANAP payload\n");
/* map->l3 now contains all the interesting information from the NAS PDU, if any.
* If no useful information could be decoded, still continue to select a hopefully adequate link by round robin.
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/36207?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: I7db0d933a8f17f8c410141f43dab12b8c19fc8ae
Gerrit-Change-Number: 36207
Gerrit-PatchSet: 5
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/36208?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: don't forward paging requests to HNB's not yet registered
......................................................................
don't forward paging requests to HNB's not yet registered
Change-Id: I22ddfea1c6e13e91acecaf731b446e2de0976892
---
M src/osmo-hnbgw/hnbgw_cn.c
1 file changed, 11 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, approved
diff --git a/src/osmo-hnbgw/hnbgw_cn.c b/src/osmo-hnbgw/hnbgw_cn.c
index 2163f2c..9da8377 100644
--- a/src/osmo-hnbgw/hnbgw_cn.c
+++ b/src/osmo-hnbgw/hnbgw_cn.c
@@ -305,6 +305,8 @@
/* FIXME: determine which HNBs to send this Paging command,
* rather than broadcasting to all HNBs */
llist_for_each_entry(hnb, &g_hnbgw->hnb_list, list) {
+ if (!hnb->hnb_registered)
+ continue;
rua_tx_udt(hnb, data, len);
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/36208?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: I22ddfea1c6e13e91acecaf731b446e2de0976892
Gerrit-Change-Number: 36208
Gerrit-PatchSet: 5
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/36212?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: stats: Introduce CNPOOL counter macro
......................................................................
stats: Introduce CNPOOL counter macro
Ever since the ancient days of OpenBSC, we've always had macros to
abbreviate the cumbersome 'rate_ctr_inc(rate_ctr_group_get_ctr(...))'
construct. Somehow this was missed here.
Also, since 2018 (libosmocore.git 175a4ae93aaf1068b61041dca12962059d65ed55)
we have rate_ctr_inc2() to make it even simpler...
Change-Id: I5b9e6b2069eed533c472cea8483a370f7fcc8e74
---
M include/osmocom/hnbgw/hnbgw.h
M src/osmo-hnbgw/hnbgw_cn.c
2 files changed, 22 insertions(+), 4 deletions(-)
Approvals:
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
osmith: Looks good to me, approved
diff --git a/include/osmocom/hnbgw/hnbgw.h b/include/osmocom/hnbgw/hnbgw.h
index 4d59560..008f49f 100644
--- a/include/osmocom/hnbgw/hnbgw.h
+++ b/include/osmocom/hnbgw/hnbgw.h
@@ -203,6 +203,8 @@
struct rate_ctr_group *ctrs;
};
+#define CNPOOL_CTR_INC(cnpool, x) rate_ctr_inc2((cnpool)->ctrs, x)
+
/* A CN peer, like 'msc 0' or 'sgsn 23' */
struct hnbgw_cnlink {
struct llist_head entry;
diff --git a/src/osmo-hnbgw/hnbgw_cn.c b/src/osmo-hnbgw/hnbgw_cn.c
index 7720416..7e4a3cd 100644
--- a/src/osmo-hnbgw/hnbgw_cn.c
+++ b/src/osmo-hnbgw/hnbgw_cn.c
@@ -1053,7 +1053,7 @@
CNLINK_CTR_INC(cnlink, CNLINK_CTR_CNPOOL_SUBSCR_KNOWN);
if (map->l3.is_emerg) {
CNLINK_CTR_INC(cnlink, CNLINK_CTR_CNPOOL_EMERG_FORWARDED);
- rate_ctr_inc(rate_ctr_group_get_ctr(cnpool->ctrs, CNPOOL_CTR_EMERG_FORWARDED));
+ CNPOOL_CTR_INC(cnpool, CNPOOL_CTR_EMERG_FORWARDED);
}
return cnlink;
}
@@ -1090,9 +1090,9 @@
* them are usable -- wrap to the start. */
cnlink = round_robin_next ? : round_robin_first;
if (!cnlink) {
- rate_ctr_inc(rate_ctr_group_get_ctr(cnpool->ctrs, CNPOOL_CTR_SUBSCR_NO_CNLINK));
+ CNPOOL_CTR_INC(cnpool, CNPOOL_CTR_SUBSCR_NO_CNLINK);
if (map->l3.is_emerg)
- rate_ctr_inc(rate_ctr_group_get_ctr(cnpool->ctrs, CNPOOL_CTR_EMERG_LOST));
+ CNPOOL_CTR_INC(cnpool, CNPOOL_CTR_EMERG_LOST);
return NULL;
}
@@ -1105,7 +1105,7 @@
if (map->l3.is_emerg) {
CNLINK_CTR_INC(cnlink, CNLINK_CTR_CNPOOL_EMERG_FORWARDED);
- rate_ctr_inc(rate_ctr_group_get_ctr(cnpool->ctrs, CNPOOL_CTR_EMERG_FORWARDED));
+ CNPOOL_CTR_INC(cnpool, CNPOOL_CTR_EMERG_FORWARDED);
}
/* A CN link was picked by round-robin, so update the next round-robin nr to pick */
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/36212?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: I5b9e6b2069eed533c472cea8483a370f7fcc8e74
Gerrit-Change-Number: 36212
Gerrit-PatchSet: 4
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/36215?usp=email )
(
1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: cosmetic: Fix comment in mgw_fsm.c: One RAB per context_map, not hnb!
......................................................................
cosmetic: Fix comment in mgw_fsm.c: One RAB per context_map, not hnb!
Change-Id: I0cecccd94ba9c1b14de083265a394a210b758b92
---
M src/osmo-hnbgw/mgw_fsm.c
1 file changed, 12 insertions(+), 3 deletions(-)
Approvals:
pespin: Looks good to me, but someone else must approve
osmith: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/osmo-hnbgw/mgw_fsm.c b/src/osmo-hnbgw/mgw_fsm.c
index 6fd0e6a..77d3961 100644
--- a/src/osmo-hnbgw/mgw_fsm.c
+++ b/src/osmo-hnbgw/mgw_fsm.c
@@ -47,9 +47,9 @@
#include <osmocom/hnbgw/tdefs.h>
#include <osmocom/mgcp_client/mgcp_client_endpoint_fsm.h>
-/* NOTE: This implementation can only handle one RAB per hnbgw context. This simplification was made because usually
- * a voice call will require only one RAB at a time. An exception may be corner cases like video calls, which we
- * do not support at the moment. */
+/* NOTE: This implementation can only handle one RAB per context_map (== SCCP connection == RUA connection == UE
+ * context). This simplification was made because usually a voice call will require only one RAB at a time. An exception
+ * may be corner cases like video calls, which we do not support at the moment. */
/* Send Iu Release Request, this is done in erroneous cases from which we cannot recover */
static void tx_release_req(struct hnbgw_context_map *map)
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/36215?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: I0cecccd94ba9c1b14de083265a394a210b758b92
Gerrit-Change-Number: 36215
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged