Attention is currently required from: neels.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/29376 )
Change subject: ipacces-config: override gsm_bts_check_cfg() to void checking unset bts configuration
......................................................................
Patch Set 1:
(2 comments)
Commit Message:
https://gerrit.osmocom.org/c/osmo-bsc/+/29376/comment/a1d49dd5_d297b071
PS1, Line 7: ipacces-config: override gsm_bts_check_cfg() to void checking unset bts configuration
> i fail to understand this sentence
ipaccess-config uses some shared code with osmo-bsc but doesn't really use some of the fields in there, because it's basically not really acting as a full bsc. Hence, those values are really unset and checking against them make no sense. For instance, arfcn of the BTS.
Patchset:
PS1:
> so, by setting 'weak' in libbsc, ipaccess-config can override? […]
Yes, by setting weak ipaccess-config overrides it.
As mentioned in an earlier patch, the main problem here is ipaccess-config implementing some lowest layer ipa parts on its own (faking stuff) then pluggin in some shared middle-layer shared code.
But rewriting this is totally out of the scope of this patchset.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/29376
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I22ff0d22d6dcf9b0f715bfa4e0daeb52c4028308
Gerrit-Change-Number: 29376
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 19 Sep 2022 14:10:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: comment
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/29373 )
Change subject: ipaccess-config: Initialize RSL ts driver fd to proper value
......................................................................
ipaccess-config: Initialize RSL ts driver fd to proper value
ipaccess-config sets up the entire line in a fake way.
That requires also setting the fd of each TS used to -1 in order to
avoid library code interacting with it during tear down if an error
occurs.
Change-Id: I19eb23a46f89b96dd8d63742ca2078ecd5c9ab6b
---
M src/ipaccess/ipaccess-config.c
1 file changed, 1 insertion(+), 0 deletions(-)
Approvals:
neels: Looks good to me, but someone else must approve
fixeria: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/ipaccess/ipaccess-config.c b/src/ipaccess/ipaccess-config.c
index a214d28..4d5e8b1 100644
--- a/src/ipaccess/ipaccess-config.c
+++ b/src/ipaccess/ipaccess-config.c
@@ -148,6 +148,7 @@
/* create E1 timeslots for signalling and TRAU frames */
e1inp_ts_config_sign(sign_ts, line);
e1inp_ts_config_sign(rsl_ts, line);
+ rsl_ts->driver.ipaccess.fd.fd = -1;
/* create signalling links for TRX0 */
oml_link = e1inp_sign_link_create(sign_ts, E1INP_SIGN_OML,
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/29373
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I19eb23a46f89b96dd8d63742ca2078ecd5c9ab6b
Gerrit-Change-Number: 29373
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(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
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/29372 )
Change subject: ipaccess-config: Initiate missing IPA osmo_link
......................................................................
ipaccess-config: Initiate missing IPA osmo_link
Since this is created by osmo-bsc, it is also expected to be there by
ipaccess_drop_oml() in the shared libbsc code. But ipaccess-config was
not creating it, so let's do so.
Let's explicitly assert this condition in the code path expecting the
pointer to be instantiated in shared code, to easily track related
issues in the future.
Change-Id: I3f63f6827f7c5d7a21ac125b7ca6b35244efbb65
---
M src/ipaccess/ipaccess-config.c
M src/osmo-bsc/bts_ipaccess_nanobts.c
2 files changed, 5 insertions(+), 1 deletion(-)
Approvals:
neels: Looks good to me, but someone else must approve
fixeria: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/ipaccess/ipaccess-config.c b/src/ipaccess/ipaccess-config.c
index 7c8d486..a214d28 100644
--- a/src/ipaccess/ipaccess-config.c
+++ b/src/ipaccess/ipaccess-config.c
@@ -129,7 +129,7 @@
{
struct e1inp_line *line;
struct e1inp_ts *sign_ts, *rsl_ts;
- struct e1inp_sign_link *oml_link, *rsl_link;
+ struct e1inp_sign_link *oml_link, *osmo_link, *rsl_link;
line = talloc_zero(tall_bsc_ctx, struct e1inp_line);
if (!line)
@@ -152,11 +152,14 @@
/* create signalling links for TRX0 */
oml_link = e1inp_sign_link_create(sign_ts, E1INP_SIGN_OML,
bts->c0, IPAC_PROTO_OML, 0);
+ osmo_link = e1inp_sign_link_create(sign_ts, E1INP_SIGN_OSMO,
+ bts->c0, IPAC_PROTO_OSMO, 0);
rsl_link = e1inp_sign_link_create(rsl_ts, E1INP_SIGN_RSL,
bts->c0, IPAC_PROTO_RSL, 0);
/* create back-links from bts/trx */
bts->oml_link = oml_link;
+ bts->osmo_link = osmo_link;
bts->c0->rsl_link_primary = rsl_link;
/* default port at BTS for incoming connections is 3006 */
diff --git a/src/osmo-bsc/bts_ipaccess_nanobts.c b/src/osmo-bsc/bts_ipaccess_nanobts.c
index 3165944..c4df29e 100644
--- a/src/osmo-bsc/bts_ipaccess_nanobts.c
+++ b/src/osmo-bsc/bts_ipaccess_nanobts.c
@@ -616,6 +616,7 @@
gsm_bts_stats_reset(bts);
/* Also drop the associated OSMO link */
+ OSMO_ASSERT(bts->osmo_link);
e1inp_sign_link_destroy(bts->osmo_link);
bts->osmo_link = NULL;
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/29372
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I3f63f6827f7c5d7a21ac125b7ca6b35244efbb65
Gerrit-Change-Number: 29372
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(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
Attention is currently required from: neels.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/29372 )
Change subject: ipaccess-config: Initiate missing IPA osmo_link
......................................................................
Patch Set 1: Code-Review+2
(1 comment)
File src/osmo-bsc/bts_ipaccess_nanobts.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/29372/comment/96d1b1fc_e9bc7eda
PS1, Line 619: OSMO_ASSERT(bts->osmo_link);
> would it make sense to assert this earlier, while using the link, not only when dropping it?
the interesting path here is when dropping it, since other apps may not use it. The main problem here really is ipaccess-config reimplementing all the lowest ipa parts with its own fake code while still hooking in some middle-layer parts.
But rewritting that is totally out of the scope of this patchset.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/29372
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I3f63f6827f7c5d7a21ac125b7ca6b35244efbb65
Gerrit-Change-Number: 29372
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(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-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 19 Sep 2022 14:06:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: neels.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/29364 )
Change subject: oml: Delay Tx of OPSTART(BBTRANSC) after rx of RSL CONNECT ACK
......................................................................
Patch Set 1: Code-Review+2
(2 comments)
File src/osmo-bsc/bts_ipaccess_nanobts.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/29364/comment/83ca420b_c246797a
PS1, Line 453: LOGPFOH(DNM, LOGL_ERROR, foh, "IPACC RSL Connect ACK received on incorrect object class %d!\n", foh->obj_class);
> (log string of object class? same below)
the obj class string should already be printed as part of LOGPFOH, so printing the string again is not that useful.
File src/osmo-bsc/nm_bb_transc_fsm.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/29364/comment/50cfc49f_6b881dda
PS1, Line 254: bb_transc->mo.opstart_sent = false;
> (patch would look nicer without move of this line)
It still makes sense to move it since it follows better the natural sequence of events on how this flags are used/set.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/29364
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ief46bad5075b656c13d1f09a0724e33283148236
Gerrit-Change-Number: 29364
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(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-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 19 Sep 2022 14:05:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: comment
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/29415 )
Change subject: hnbgw: Unregister HNB if SCTP link is restarted
......................................................................
hnbgw: Unregister HNB if SCTP link is restarted
Sometimes an hNodeB may reconnect (SCTP INIT) using same SCTP tuple without
closing the previous conn. This is handled by the SCTP stack by means of
pushing a RESET notification up the stack to the sctp_recvmsg() user.
Let's handle this by marking the HNB as unregistered, since most
probably a HNB Register Req comes next as the upper layer state is
considered lost.
Depends: libosmo-netif.git Change-Id I0ee94846a15a23950b9d70eaaef1251267296bdd
Related: SYS#6113
Change-Id: Ib22881b1a34b1c3dd350912b3de8904917cf34ef
---
M src/osmo-hnbgw/hnbgw.c
1 file changed, 19 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/15/29415/1
diff --git a/src/osmo-hnbgw/hnbgw.c b/src/osmo-hnbgw/hnbgw.c
index 8c2dc64..124a647 100644
--- a/src/osmo-hnbgw/hnbgw.c
+++ b/src/osmo-hnbgw/hnbgw.c
@@ -251,8 +251,25 @@
msg->dst = hnb;
rc = osmo_stream_srv_recv(conn, msg);
- if (rc == -EAGAIN) {
- /* Notification received */
+ /* Notification received */
+ if (msgb_sctp_msg_flags(msg) & OSMO_STREAM_SCTP_MSG_FLAGS_NOTIFICATION) {
+ union sctp_notification *notif = (union sctp_notification *)msgb_data(msg);
+ switch (notif->sn_header.sn_type) {
+ case SCTP_ASSOC_CHANGE:
+ switch (notif->sn_assoc_change.sac_state) {
+ case SCTP_RESTART:
+ LOGHNB(hnb, DMAIN, LOGL_NOTICE, "HNB SCTP conn RESTARTed, marking as HNBAP-unregistered\n");
+ hnb->hnb_registered = false;
+ break;
+ }
+ break;
+ }
+ msgb_free(msg);
+ return 0;
+ } else if (rc == -EAGAIN) {
+ /* Older versions of osmo_stream_srv_recv() not supporting
+ * msgb_sctp_msg_flags() may still return -EAGAIN when an sctp
+ * notification is received. */
msgb_free(msg);
return 0;
} else if (rc < 0) {
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/29415
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: Ib22881b1a34b1c3dd350912b3de8904917cf34ef
Gerrit-Change-Number: 29415
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange