pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-cbc/+/34246 )
Change subject: Catch and forbid configuring peers before configuring main protocol node
......................................................................
Catch and forbid configuring peers before configuring main protocol node
When the user enters each "peer" node, the related object is created if
not yet existing, and its updated config is applied (connect()) upon
exiting the node (cbc_peer_apply_cfg_chg()). When connect happens, it
needs to obtain the local IP address from the main protocol node
(cbsp|sbcap)", which means it must be configured beforehand, otherwise
the peers connect using the default values.
Hence, it makes no sense to configure peers if the main protocol
information has not yet been configured. The usual example configs as
well as the write-config VTY commands provide correct order of things.
Catch and forbid the user providing a config file where the peers are
configured before the main protocol nodes.
Related: OS#6154
Change-Id: I678f9e6715c85b1eb9116cc892f1a8299577c0c2
---
M include/osmocom/cbc/cbc_data.h
M src/cbc_main.c
M src/cbc_vty.c
3 files changed, 49 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-cbc refs/changes/46/34246/1
diff --git a/include/osmocom/cbc/cbc_data.h b/include/osmocom/cbc/cbc_data.h
index 6d64f04..d5e5cde 100644
--- a/include/osmocom/cbc/cbc_data.h
+++ b/include/osmocom/cbc/cbc_data.h
@@ -57,11 +57,13 @@
struct {
char *local_host;
int local_port;
+ bool configured;
} cbsp;
struct {
char *local_host[CBC_MAX_LOC_ADDRS];
unsigned int num_local_host;
int local_port;
+ bool configured;
} sbcap;
struct {
char *local_host;
diff --git a/src/cbc_main.c b/src/cbc_main.c
index e75b328..c777ef6 100644
--- a/src/cbc_main.c
+++ b/src/cbc_main.c
@@ -108,12 +108,16 @@
static int cbc_vty_go_parent(struct vty *vty)
{
switch (vty->node) {
+ case CBSP_NODE:
+ g_cbc->config.cbsp.configured = true;
+ break;
case SBcAP_NODE:
/* If no local addr set, add a default one: */
if (g_cbc->config.sbcap.num_local_host == 0) {
g_cbc->config.sbcap.local_host[0] = talloc_strdup(g_cbc, "127.0.0.1");
g_cbc->config.sbcap.num_local_host = 1;
}
+ g_cbc->config.sbcap.configured = true;
vty->node = CONFIG_NODE;
vty->index = NULL;
break;
diff --git a/src/cbc_vty.c b/src/cbc_vty.c
index 631ef96..12b7d7b 100644
--- a/src/cbc_vty.c
+++ b/src/cbc_vty.c
@@ -576,6 +576,26 @@
enum cbc_peer_protocol proto;
proto = get_string_value(cbc_peer_proto_name_vty, argv[0]);
+ switch (proto) {
+ case CBC_PEER_PROTO_CBSP:
+ if (!g_cbc->config.cbsp.configured) {
+ vty_out(vty, "%% Node '%s' must be configured before configuring node 'peer'!%s",
+ argv[0], VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+ break;
+ case CBC_PEER_PROTO_SBcAP:
+ if (!g_cbc->config.sbcap.configured) {
+ vty_out(vty, "%% Node '%s' must be configured before configuring node 'peer'!%s",
+ argv[0], VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+ break;
+ case CBC_PEER_PROTO_SABP:
+ default:
+ return CMD_WARNING;
+ }
+
peer = cbc_peer_by_name(argv[1]);
if (!peer)
peer = cbc_peer_create(argv[1], proto);
--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/34246
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: I678f9e6715c85b1eb9116cc892f1a8299577c0c2
Gerrit-Change-Number: 34246
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: pespin.
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/34244 )
Change subject: meas_feed: Increase wqueue max_len to 100 and make it vty-configurable
......................................................................
Patch Set 2:
(1 comment)
File src/osmo-bsc/bsc_vty.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/34244/comment/2cdcba1e_29b90abd
PS2, Line 2424: 0-65535
Is 0 really useful here?
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34244
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ib2e3591498c038b8e59f3ad447ac1f65928d6da8
Gerrit-Change-Number: 34244
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: daniel <dwillmann(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 29 Aug 2023 15:22:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: pespin.
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/34243 )
Change subject: meas_feed: Refactor fd/wqueue lifecycle
......................................................................
Patch Set 2: Code-Review+1
(1 comment)
File src/osmo-bsc/meas_feed.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/34243/comment/26a64550_3767a5f1
PS2, Line 158: LOGP(DMEAS, LOGL_DEBUG, "meas_feed: registered signal callback\n");
Move this down to osmo_signal_register_handler()
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34243
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I96b0b5c4654970ba1c3e2aecfa896e310063ab6f
Gerrit-Change-Number: 34243
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 29 Aug 2023 15:18:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: daniel.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/34245
to look at the new patch set (#2).
Change subject: ns2: Add VTY option to change the max write queue size for UDP
......................................................................
ns2: Add VTY option to change the max write queue size for UDP
In some cases the default max length of the osmo_io txqueue could be too
small. Set it to 128 by default and add a VTY option to change it for
an NSI (program-wide).
Change-Id: I993b87fd6b83b3981f5e293f70b931075afec715
Related: SYS#6550
---
M src/gb/gprs_ns2.c
M src/gb/gprs_ns2_internal.h
M src/gb/gprs_ns2_udp.c
M src/gb/gprs_ns2_vty.c
4 files changed, 36 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/45/34245/2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34245
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I993b87fd6b83b3981f5e293f70b931075afec715
Gerrit-Change-Number: 34245
Gerrit-PatchSet: 2
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/34245 )
Change subject: ns2: Add VTY option to change the UDP write queue
......................................................................
Patch Set 1:
(1 comment)
File src/gb/gprs_ns2_vty.c:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-10743):
https://gerrit.osmocom.org/c/libosmocore/+/34245/comment/f1a3f890_a5fe6afa
PS1, Line 598: if (vty_nsi->txqueue_max_length != NS_DEFAULT_TXQUEUE_MAX_LENGTH)
suspect code indent for conditional statements (8, 8)
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34245
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I993b87fd6b83b3981f5e293f70b931075afec715
Gerrit-Change-Number: 34245
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Tue, 29 Aug 2023 15:07:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: dexter.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/34192 )
Change subject: pcuif_proto: check confirm flag in struct gsm_pcu_if_pch
......................................................................
Patch Set 4: Code-Review-1
(5 comments)
File src/osmo-bsc/abis_rsl.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/34192/comment/cab4eb38_28761dbf
PS4, Line 1013: msgb_put_u32(msg, msg_id);
Just curious, did you check if Ericsson expects this ERIC_MOBILE_ID to actually be the TLLI? Or it's really just some random ID liek our new msg_id?
File src/osmo-bsc/pcu_sock.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/34192/comment/4dbd088b_52997fbc
PS2, Line 559: if (!pch->confirm)
> In the current implementation we always include RSL_IE_ERIC_MOBILE_ID when sending the IMMEDIATE ASS […]
Cool :)
File src/osmo-bsc/pcu_sock.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/34192/comment/621407d6_9b09fbb0
PS4, Line 557: } else {
> else is not generally useful after a break or return
Please fix.
https://gerrit.osmocom.org/c/osmo-bsc/+/34192/comment/86289ac6_513128a0
PS4, Line 558: if (pcu_rx_rr_paging_pch(bts, pag_grp, pch))
> code indent should use tabs where possible
Please fix.
https://gerrit.osmocom.org/c/osmo-bsc/+/34192/comment/aa579f7d_cbf0409b
PS4, Line 561: return pcu_tx_pch_confirm(bts, pch->msg_id);
why are you confirming it here? You should be confirming it when scheduling it / sending it to the BTS. That may be a while in the future due to the BTS paging queue being full.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34192
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I3d2842626b7e8325860ea3160c7d900d39e953a0
Gerrit-Change-Number: 34192
Gerrit-PatchSet: 4
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 29 Aug 2023 14:56:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: comment
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-bsc/+/34243
to look at the new patch set (#2).
Change subject: meas_feed: Refactor fd/wqueue lifecycle
......................................................................
meas_feed: Refactor fd/wqueue lifecycle
The previous checks had several rough edges which may end up in
unexpected behaviors, specially with fd=0 vs fd=-1.
The new code is much more robust.
Change-Id: I96b0b5c4654970ba1c3e2aecfa896e310063ab6f
---
M src/osmo-bsc/meas_feed.c
1 file changed, 46 insertions(+), 30 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/43/34243/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34243
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I96b0b5c4654970ba1c3e2aecfa896e310063ab6f
Gerrit-Change-Number: 34243
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset
Attention is currently required from: pespin.
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/34192 )
Change subject: pcuif_proto: check confirm flag in struct gsm_pcu_if_pch
......................................................................
Patch Set 4:
(2 comments)
File src/osmo-bsc/pcu_sock.c:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-10740):
https://gerrit.osmocom.org/c/osmo-bsc/+/34192/comment/468f03f6_169eeea6
PS4, Line 557: } else {
else is not generally useful after a break or return
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-10740):
https://gerrit.osmocom.org/c/osmo-bsc/+/34192/comment/754d1c9b_f1d5107a
PS4, Line 558: if (pcu_rx_rr_paging_pch(bts, pag_grp, pch))
code indent should use tabs where possible
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34192
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I3d2842626b7e8325860ea3160c7d900d39e953a0
Gerrit-Change-Number: 34192
Gerrit-PatchSet: 4
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 29 Aug 2023 14:46:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment