laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/38002?usp=email )
Change subject: Revert "hnb_persistent: Use incrementing counter for rate_ctr + stat_item index"
......................................................................
Revert "hnb_persistent: Use incrementing counter for rate_ctr + stat_item index"
This reverts commit 61e278a452bf4fd240e45f1fe8c094a4b3795317 as it
created errors in our test suite. Let's live with the cosmetic error
message but have working tests instead. We should probably consider
removing the printing of the message from libosmocore, at least in case
the counters also have names set?
Closes: OS#6557
Change-Id: I2f7d3f3c88775e2926661e4760ec1d8723c0400c
---
M src/osmo-hnbgw/hnbgw.c
1 file changed, 2 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/02/38002/1
diff --git a/src/osmo-hnbgw/hnbgw.c b/src/osmo-hnbgw/hnbgw.c
index 90b8147..d4515a8 100644
--- a/src/osmo-hnbgw/hnbgw.c
+++ b/src/osmo-hnbgw/hnbgw.c
@@ -497,22 +497,19 @@
osmo_timer_schedule(&hnbp->disconnected_timeout, period_s, 0);
}
-static unsigned int g_hnbp_ctr_id;
-
struct hnb_persistent *hnb_persistent_alloc(const struct umts_cell_id *id)
{
struct hnb_persistent *hnbp = talloc_zero(g_hnbgw, struct hnb_persistent);
- unsigned int ctr_id = g_hnbp_ctr_id++;
if (!hnbp)
return NULL;
hnbp->id = *id;
hnbp->id_str = talloc_strdup(hnbp, umts_cell_id_to_str(id));
- hnbp->ctrs = rate_ctr_group_alloc(hnbp, &hnb_ctrg_desc, ctr_id);
+ hnbp->ctrs = rate_ctr_group_alloc(hnbp, &hnb_ctrg_desc, 0);
if (!hnbp->ctrs)
goto out_free;
rate_ctr_group_set_name(hnbp->ctrs, hnbp->id_str);
- hnbp->statg = osmo_stat_item_group_alloc(hnbp, &hnb_statg_desc, ctr_id);
+ hnbp->statg = osmo_stat_item_group_alloc(hnbp, &hnb_statg_desc, 0);
if (!hnbp->statg)
goto out_free_ctrs;
osmo_stat_item_group_set_name(hnbp->statg, hnbp->id_str);
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/38002?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I2f7d3f3c88775e2926661e4760ec1d8723c0400c
Gerrit-Change-Number: 38002
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Attention is currently required from: neels, pespin.
laforge has posted comments on this change by neels. ( https://gerrit.osmocom.org/c/libosmo-netif/+/37991?usp=email )
Change subject: coverity CID#322728
......................................................................
Patch Set 1:
(1 comment)
File src/stream.c:
https://gerrit.osmocom.org/c/libosmo-netif/+/37991/comment/4dd37f9b_179604b… :
PS1, Line 282: ret = sctp_recvmsg(fd, msg->tail, msgb_tailroom(msg), NULL, NULL, &sinfo, &flags);
> man sctp_recvmsg is a bit blurry on whether sinfo needs to be initialized, so I think it's fine to b […]
I would assume that any such socket related call will not need zero-initialization of pure output arguments. If it's an input, it needs initialization. But it's exclusively a caller-allocated chunk of memory for output.
Lookig at the actual implementation at https://github.com/sctp/lksctp-tools/blob/master/src/lib/recvmsg.c - there is a code path in case recvmsg returns a non-error resposne but then no cmsg for SCTP_SNDRCV is found. In that case it's not initialized by sctp_recvmsg. But then it is a kernel bug and zero-initialization is just plastering over it. Our code needs the sctp_sndrcvinfo to know which stream / PPID the message was received on.
So I think this change is "side-ways development" and not addressing the actual issue: There should probably be an ASSERT or soemthing in libsctp... I'll raise a bug there.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/37991?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ia4c6b7c6f16331932e3f584b800e86d422a4f019
Gerrit-Change-Number: 37991
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 03 Sep 2024 09:17:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Attention is currently required from: daniel.
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37956?usp=email )
Change subject: StatsD_Checker: Allow building without VTY support
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37956?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I5421c76e4f303fd16d4db945a1c69910e40ac820
Gerrit-Change-Number: 37956
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 03 Sep 2024 09:10:26 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: neels.
pespin has posted comments on this change by neels. ( https://gerrit.osmocom.org/c/libosmo-netif/+/37992?usp=email )
Change subject: coverity
......................................................................
Patch Set 1:
(1 comment)
File src/rtp.c:
https://gerrit.osmocom.org/c/libosmo-netif/+/37992/comment/75e1b77c_70fb2de… :
PS1, Line 120: payload_len = ((int)msg->len) - sizeof(struct rtp_hdr) - csrc_len;
are you sure this is needed? you already had an int csrc_len in the line, and you still have a unsigned size_t (sizeof) now...
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/37992?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I30beeac45ff2d8c08905986af9fabfda071ddc5b
Gerrit-Change-Number: 37992
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 03 Sep 2024 09:10:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No