Attention is currently required from: neels, laforge, pespin.
fixeria has posted comments on this change. (
https://gerrit.osmocom.org/c/osmo-hnbgw/+/33169 )
Change subject: fix umts_cell_id_name(): show CID
......................................................................
Patch Set 4: Code-Review+1
(1 comment)
File src/osmo-hnbgw/hnbgw.c:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/33169/comment/9722d324_28abfde8
PS2, Line 348: return talloc_asprintf(OTC_SELECT, "%u-%u-L%u-R%u-S%u-C%u",
ucid->mcc, ucid->mnc, ucid->lac, ucid->rac,
I hope this is not called everytime we log a line :)
So the only user of this function is `hnb_context_name()`, which is employed by `LOGHNB`.
This means that `talloc_asprintf()` *will* be called every time we log something using
that macro, but only if the configured logging level lets the logging message pass.
With Neels we checked how `talloc_asprintf()` works under the hood, and it does not really
look that bad. Most of the times it will use its internal stack allocated buffer when
calling `asprintf()` and then simply memcpy() it to the allocated heap chunk.
I never used this project and don't know how verbose it is with default logging
configuration, but in general I don't think it's super critical. I would have
voted CR-1 if this was osmo-bts, which may be running on low end embedded platforms. But I
guess this project is expected to be running on some server with plenty of CPU and RAM? If
at some point in the future we narrow down performance issues to this function, we can
always revert back to using a static buffer, right?
--
To view, visit
https://gerrit.osmocom.org/c/osmo-hnbgw/+/33169
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: Id903b8579ded8b908e644808e440d373bcca8da4
Gerrit-Change-Number: 33169
Gerrit-PatchSet: 4
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: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 13 Jun 2023 14:31:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment