Attention is currently required from: pespin.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/31025 )
Change subject: Introduce tundev API
......................................................................
Patch Set 12:
(1 comment)
Patchset:
PS12:
> > but I don't really understand why adding/setting/removing addresses etc. […]
sorry, I don't understand why adding/removing/deleting addresses from gtp0 is different than from tun0. Or from any other IP-capable net-device, for that matter.
regarding netns: Yes, I saw the previous pathc. But I was referring to having functions that deal with net-devices in namespaces here in this patch.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31025
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I3463271666df1e85746fb7b06ec45a17024b8c53
Gerrit-Change-Number: 31025
Gerrit-PatchSet: 12
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 24 Jan 2023 11:04:04 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: laforge.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/31025 )
Change subject: Introduce tundev API
......................................................................
Patch Set 12:
(1 comment)
Patchset:
PS12:
> but I don't really understand why adding/setting/removing addresses etc. is constrainted to tun-devices. We have the same task for other net-devices, such as for example the GTP devices.
> So IMHO, there should be a generic API to perform those operations on any type of netdev (either by ifindex or name).
I am simply keeping those generic functions acting on interfaces private for now, but well separated in:
"""
static int tundev_mnl_add_addr(struct osmo_mnl *omnl, const char *dev_name, const struct osmo_sockaddr *osa, uint8_t prefix)
static int tundev_mnl_add_route(struct osmo_mnl *omnl,
const char *dev_name,
const struct osmo_sockaddr *dst_osa,
uint8_t dst_prefix,
const struct osmo_sockaddr *gw_osa)
static int tundev_mnl_set_ifupdown(struct osmo_mnl *omnl, const char *dev_name, bool up)
"""
> Same applies to gtp kernel devices or hdlc net-devices, right?
Those would need separate objects since they have specific requirements to set up, manage, etc. When those are added, the static functions above can be moved to a shared place and even make a public API. I don't want to make the API public now since I'm not working on those, and would take a lot more time to start changing all implementations of all those devices everywhere (and the current task at hand is already requiring me to touch a lot of stuff in lots of places).
> The netns related code is als not really specific to tun-devices, is it?
That's why I added a netns.h API in the previous commit, and the tun-device object is simply using the API to manage the netns and do the required steps at the correct points in time, without the user of the tundev having to care about those details.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31025
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I3463271666df1e85746fb7b06ec45a17024b8c53
Gerrit-Change-Number: 31025
Gerrit-PatchSet: 12
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Tue, 24 Jan 2023 10:40:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: comment
Attention is currently required from: pespin.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/31025 )
Change subject: Introduce tundev API
......................................................................
Patch Set 12:
(1 comment)
Patchset:
PS12:
I'm sorry to be having comments again... but I don't really understand why adding/setting/removing addresses etc. is constrainted to tun-devices. We have the same task for other net-devices, such as for example the GTP devices.
So IMHO, there should be a generic API to perform those operations on any type of netdev (either by ifindex or name). Whether or not the tundev code then adds another convenienece layer on top is a separate question.
The netns related code is als not really specifc to tun-devices, is it? Same applies to gtp kernel devices or hdlc net-devices, right?
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31025
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I3463271666df1e85746fb7b06ec45a17024b8c53
Gerrit-Change-Number: 31025
Gerrit-PatchSet: 12
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 24 Jan 2023 10:20:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: arehbein.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/python/osmo-python-tests/+/30980 )
Change subject: scripts/osmotestconfig.py: Fix tests failing due to attempted copy on socket files
......................................................................
Patch Set 5:
(1 comment)
File scripts/osmotestconfig.py:
https://gerrit.osmocom.org/c/python/osmo-python-tests/+/30980/comment/14381…
PS5, Line 80: ign = shutil.ignore_patterns('*.cfg', '*tmp_dummy_sock')
So who is creating this tmp_dummy_sock? I don't find any other reference to it in osmo-python-tests.
--
To view, visit https://gerrit.osmocom.org/c/python/osmo-python-tests/+/30980
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Change-Id: I3a3cc7ed135b60b97eb901cfc20fdcb924e4f664
Gerrit-Change-Number: 30980
Gerrit-PatchSet: 5
Gerrit-Owner: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 24 Jan 2023 10:04:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: arehbein.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31029 )
Change subject: osmo-bsc: Fix 'apply-config-file' CTRL command
......................................................................
Patch Set 2:
(1 comment)
File src/osmo-bsc/bsc_ctrl.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/31029/comment/7baba179_a5ba65ba
PS2, Line 89: cmd->reply = talloc_asprintf(cmd, "Errors in neighbor configuration");
This error message looks too specific/implementation-related. Something like "Config validation check error" or something similar would be more suitable, don't you think?
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31029
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I24ae8cd7e5e0d15eab9fd04b1858072bf0bad36a
Gerrit-Change-Number: 31029
Gerrit-PatchSet: 2
Gerrit-Owner: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 24 Jan 2023 10:02:55 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: arehbein.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/30982 )
Change subject: bsc_ctrl_commands: Add GET for bts neighbor-list (local bts numbers)
......................................................................
Patch Set 5: -Code-Review
(5 comments)
File src/osmo-bsc/neighbor_ident_ctrl.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/30982/comment/60628ad1_8a67212f
PS3, Line 118: llist_for_each_entry(n, &bts->neighbors, entry) {
> Hmm alright. […]
I see what you mean now, "neighbor-bts" prefix means only those added by its bts_nr.
Indeed then maybe filter out by neighbor->type == NEIGHBOR_TYPE_BTS_NR here.
I think it may be a good idea that you reach the user and ask him for these details, since the provided example doesn't show up this kind of details.
Sorry for all the discussions here, all the neighbor stuff is always a bit confusing since there are many options.
File src/osmo-bsc/neighbor_ident_ctrl.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/30982/comment/246e7635_7ad5c447
PS5, Line 113: cmd->reply = "bts not found.";
I don't see the error lines in other functions using a dot at the end. Let's try to be consistent (I know sometimes we aren't ;)
https://gerrit.osmocom.org/c/osmo-bsc/+/30982/comment/f84b3447_773bd4e0
PS5, Line 119: if (resolve_local_neighbor(&neighbor_bts, bts, n)) {
Better check against "< 0" here, as usual for system programming and error codes, it's clearer. Otherwise I had to look whether this returned a pointer.
https://gerrit.osmocom.org/c/osmo-bsc/+/30982/comment/6696b8eb_8bc42b65
PS5, Line 120: LOGP(DCTRL, LOGL_ERROR, "Error resolving neighbor entry for BTS %" PRIu8 ".\n", bts->nr);
I wouldn't log an error here, it is expected that some neighbors are remote (BTS under another BSSC), and hence it is expected that some neighbor_bts may not be found. see resolve_neighbors() as an example.
File tests/ctrl_test_runner.py:
https://gerrit.osmocom.org/c/osmo-bsc/+/30982/comment/37de1c71_39f67617
PS5, Line 630: self.assertEqual(r['value'], None)
Shouldn't this be an empty string? Or is None simply somehow converted to an empty string?
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/30982
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I79aeffd93089086f57c66787fe20b439a4d8b6b4
Gerrit-Change-Number: 30982
Gerrit-PatchSet: 5
Gerrit-Owner: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 24 Jan 2023 10:01:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: arehbein <arehbein(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment