neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-upf/+/30466 )
Change subject: fix access/core mixup of PDR IDs / tunmap FAR
......................................................................
Patch Set 2: -Code-Review
(1 comment)
Patchset:
PS1:
> I like the a2c/c2a naming :) Not sure if it's considered important enough for Osmocom to patch for t […]
well, do feel free to submit a patch =)
(whether your employer regards that as work you get paid for is another question)
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/30466
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: I66babdfe4c1746bd3bf259342ce80dae2661de8c
Gerrit-Change-Number: 30466
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 09 Dec 2022 17:20:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: arehbein <arehbein(a)sysmocom.de>
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: arehbein, pespin.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-upf/+/30459 )
Change subject: VTY 'show gtp': more accurately identify local/remote IP
......................................................................
Patch Set 2: Code-Review+2
(1 comment)
Patchset:
PS2:
> I'm in favor of logging 'local' and 'remote' instead of just 'l' and 'r', but I suppose that's a mat […]
i prefer explicit, but there is a practical limiting factor: log lines i produce tend to be overly long. particularly in wireshark that can make gsmtap_log very hard to read (has a length limit on the info column). So especially when we say "local" and "remote" for four GTP addrs, four TEIDs, and two SEIDs in one log line, that's where "l" and "r" has to be enough...
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/30459
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: Ic539ebe84a0853f665e5b8b8489dd587e6907287
Gerrit-Change-Number: 30459
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 09 Dec 2022 17:18:14 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: arehbein <arehbein(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: arehbein.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-upf/+/30461 )
Change subject: tunmap: choose local GTP addr by Network Instance IEs
......................................................................
Patch Set 2:
(2 comments)
File src/osmo-upf/up_session.c:
https://gerrit.osmocom.org/c/osmo-upf/+/30461/comment/1fae73dc_3bb0db2c
PS2, Line 124: struct osmo_sockaddr osa = {};
> This (`{}`) doesn't seem to be ISO C (or I misunderstood the syntax section of the latest draft), is […]
yeah we've had some discussions on that before.
struct foo f = {};
initializes all members to zero.
It was then brought to my attention that the "normal" way to do this is:
struct foo = {0};
I find this syntax odd, because 0 is assigned to the first member of a struct, and the rest of the members get an implicit zero because they are not present. that works fine with a struct like this:
struct foo {
int first;
int second;
};
but when the struct has "nested" members the {0} syntax looks incorrrect:
struct foo {
int arr[23];
};
struct foo f = {0};
the correct way to initialize the arr member would be
struct foo f = { {0, 1, 2} };
or
struct foo f = { {0} };
Now, in many cases, just f = {0} magically works. I'm not sure whether that is special-cased by the compiler or what. So then I started to adopt the "{0}" syntax. But *then*, a while passed and i did encounter a case where i could not initialize a struct with "{0}". i don't remember in detail, but it was a nested struct, maybe like
struct foo {
struct {
struct baz memb;
} bar;
};
So I hit a case where "{0}" doesn't compile, but "{}" works without problems.
Long story short, i have now gone back to using and prefering "{}", because it simply makes more sense to me, and all compilers we encounter in osmocom seem to be fine with that.
BTW I also often use a syntax like
f = (struct foo){};
which is a memset(0). or
f = (struct foo){
.bar = {
.baz = { 1, "alpha" },
},
};
to zero-initialize the struct and place select values at the same time, avoiding a lot of repetition.
I've gotten some frowns from code review, but so far this syntax has always worked as expected.
File tests/netinst.vty:
https://gerrit.osmocom.org/c/osmo-upf/+/30461/comment/236b7fe7_326ad830
PS2, Line 32: <cr>
> Trailing space (if that's how it looks in Gerrit). Not sure if we care if it isn't source code...
this trailing whitespace is returned from the telnet VTY, if we fix that the test will fail. so need to keep that.
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/30461
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: I15ee046a1c37b83b8a83527a67a6215a30106d81
Gerrit-Change-Number: 30461
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 09 Dec 2022 17:11:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: arehbein <arehbein(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: neels.
arehbein has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-upf/+/30461 )
Change subject: tunmap: choose local GTP addr by Network Instance IEs
......................................................................
Patch Set 2: Code-Review+1
(2 comments)
File src/osmo-upf/up_session.c:
https://gerrit.osmocom.org/c/osmo-upf/+/30461/comment/4685ee8f_dd679e62
PS2, Line 124: struct osmo_sockaddr osa = {};
This (`{}`) doesn't seem to be ISO C (or I misunderstood the syntax section of the latest draft), is it some GCC extension or anything like that (?). Initialization to zero of all members I guess?
File tests/netinst.vty:
https://gerrit.osmocom.org/c/osmo-upf/+/30461/comment/a9288fc7_0ca5422d
PS2, Line 32: <cr>
Trailing space (if that's how it looks in Gerrit). Not sure if we care if it isn't source code...
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/30461
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: I15ee046a1c37b83b8a83527a67a6215a30106d81
Gerrit-Change-Number: 30461
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 09 Dec 2022 16:41:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
laforge has abandoned this change. ( https://gerrit.osmocom.org/c/All-Projects/+/30542 )
Change subject: Review access change
......................................................................
Abandoned
replaced with "master pushers" group
--
To view, visit https://gerrit.osmocom.org/c/All-Projects/+/30542
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: All-Projects
Gerrit-Branch: refs/meta/config
Gerrit-Change-Id: I9910c15766439d2ddd3aec6dd27f12e568f67b51
Gerrit-Change-Number: 30542
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: abandon
Attention is currently required from: neels.
arehbein has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-upf/+/30466 )
Change subject: fix access/core mixup of PDR IDs / tunmap FAR
......................................................................
Patch Set 2: Code-Review+2
(1 comment)
Patchset:
PS1:
> re renaming, that would have to be a separate patch. […]
I like the a2c/c2a naming :) Not sure if it's considered important enough for Osmocom to patch for this, although I could imagine it might avoid confusion/errors due to misunderstanding semantics while coding in the future.
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/30466
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: I66babdfe4c1746bd3bf259342ce80dae2661de8c
Gerrit-Change-Number: 30466
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 09 Dec 2022 13:16:04 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: arehbein <arehbein(a)sysmocom.de>
Gerrit-MessageType: comment