Change in ...osmo-bsc[master]: add vty 'no neighbors' to remove all HO targets
gerrit-no-reply at lists.osmocom.org
Tue Jul 30 15:28:21 UTC 2019
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/14768 )
Change subject: add vty 'no neighbors' to remove all HO targets
Patch Set 2:
PS1, Line 416: rc = gsm_bts_local_neighbor_del(bts, neigh_bts);
I feel more comfortable with the while(), but if two reviewers insist, I can change it to llist_for_each_entry_safe().
I am pretty sure that each neighbor is listed only once, and always will. But assuming that implementations change, and that for some weird reason a neighbor could end up listed twice, then this gsm_bts_local_neighbor_del() should semantically remove more than one item from the list. llist_for_each_entry_safe() is only safe as long as one item gets deleted. That's why I feel more comfortable with a while() loop that always goes back to the start.
I pretty much know that this situation does not apply for this particular list and it's unlikely to ever change so that this applies. But still the while() comes from a general mistrust of llist_for_each_entry_safe() where it is not directly and trivially clear for all eternity that at most one item will be removed per iteration. Here the llist_del() is hidden in another function which might change in implementation ... (not actually, but feels safer to assume that it might)
...that's my bikeshed reason to not change this
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/14768
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-CC: laforge <laforge at gnumonks.org>
Gerrit-Comment-Date: Tue, 30 Jul 2019 15:28:21 +0000
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gerrit-log