Attention is currently required from: pespin.
daniel has posted comments on this change. (
https://gerrit.osmocom.org/c/osmo-gbproxy/+/29714 )
Change subject: gbproxy_vty: Add commands to list Cell/BVC of an NSE
......................................................................
Patch Set 2:
(4 comments)
File src/gb_proxy_vty.c:
https://gerrit.osmocom.org/c/osmo-gbproxy/+/29714/comment/70caa7bd_6f637b89
PS1, Line 549: if (!strcmp(argv[0], "bss")) {
you could simply store g_cfg->bss_nses or
g_cfg->sgsn_nses in a pointer and use shared code below.
I don't think that
works with hashtable. DECLARE_HASHTABLE makes those:
struct hlist_head X_nses[256];
hash_for_hash() uses ARRAY_SIZE, so it doesn't work on a struct hlist_head *nses:
gb_proxy_vty.c: In function ‘show_gbproxy_bvc’:
/home/daniel/local/osmo-master/include/osmocom/core/utils.h:19:34: warning: division
‘sizeof (struct hlist_head *) / sizeof (struct hlist_head)’ does not compute the number of
array elements [-Wsizeof-pointer-div]
19 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
| ^
/home/daniel/local/osmo-master/include/osmocom/core/hashtable.h:19:26: note: in expansion
of macro ‘ARRAY_SIZE’
19 | #define HASH_SIZE(name) (ARRAY_SIZE(name))
| ^~~~~~~~~~
/home/daniel/local/osmo-master/include/osmocom/core/hashtable.h:101:60: note: in expansion
of macro ‘HASH_SIZE’
101 | for ((bkt) = 0, obj = NULL; obj == NULL && (bkt) <
HASH_SIZE(name);\
| ^~~~~~~~~
gb_proxy_vty.c:529:9: note: in expansion of macro ‘hash_for_each’
529 | hash_for_each(nses, i, nse, list) {
| ^~~~~~~~~~~~~
gb_proxy_vty.c:516:28: note: first ‘sizeof’ operand was declared here
516 | struct hlist_head *nses;
| ^~~~
https://gerrit.osmocom.org/c/osmo-gbproxy/+/29714/comment/1e601b2b_a1301eca
PS1, Line 550: hash_for_each(g_cfg->bss_nses, i, nse, list)
please add {} around hash_for_each
Done
https://gerrit.osmocom.org/c/osmo-gbproxy/+/29714/comment/c2e5e3b8_be7b69e5
PS1, Line 554: hash_for_each(g_cfg->sgsn_nses, i, nse, list)
please add {} around hash_for_each
Done
https://gerrit.osmocom.org/c/osmo-gbproxy/+/29714/comment/542920dc_a67ec229
PS1, Line 588: hash_for_each(g_cfg->cells, i, cell, list)
please add {} around hash_for_each
Done
--
To view, visit
https://gerrit.osmocom.org/c/osmo-gbproxy/+/29714
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-gbproxy
Gerrit-Branch: master
Gerrit-Change-Id: I10c6d3f59681ec6dc98f1a3b023af446cc2a1c12
Gerrit-Change-Number: 29714
Gerrit-PatchSet: 2
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 12 Oct 2022 15:12:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment