Attention is currently required from: osmith.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27475 )
Change subject: sccp_sap_up_ran: ignore RAN until MSC is connected
......................................................................
Patch Set 1:
(2 comments)
File include/osmocom/bsc_nat/msc_fsm.h:
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27475/comment/753c1610_c38fc7df
PS1, Line 24: bool msc_fsm_is_connected(struct msc *msc);
I see lots of functions msc_fsm_* being used in lots of places, even outside "msc" object. IMHO whether this is in the FSM or not inside the msc object is implementation specific, and all this functions would be far better being called msc_* instead of msc_fsm_* (except msc_fsm_alloc, which can be used inside the msc object msc_alloc() function, but you could really simply create the FSM directly in themsc_alloc() function).
File src/osmo-bsc-nat/bsc_nat_fsm.c:
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27475/comment/0bfd603f_9de5be6c
PS1, Line 218: if (!msc_fsm_is_connected(msc)) {
msc_is_connected. I don't care about fsm internals here.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27475
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc-nat
Gerrit-Branch: master
Gerrit-Change-Id: Idf9501412484fa92e8836952609fba7c5443d6c9
Gerrit-Change-Number: 27475
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Mar 2022 15:23:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: osmith.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27474 )
Change subject: msc_fsm: send RESET to MSC on start up
......................................................................
Patch Set 1:
(1 comment)
File src/osmo-bsc-nat/msc_fsm.c:
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27474/comment/20129c9b_0af604d1
PS1, Line 33: };
You should add the entire FSM file in this commit, not the previous one.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27474
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc-nat
Gerrit-Branch: master
Gerrit-Change-Id: Icfec3ec0168c7040e88a536fa48da339349fb6cf
Gerrit-Change-Number: 27474
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Mar 2022 15:20:47 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: osmith.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27473 )
Change subject: Store MSC
......................................................................
Patch Set 1: Code-Review-1
(6 comments)
File include/osmocom/bsc_nat/bsc_nat.h:
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27473/comment/15be0799_e226b1d5
PS1, Line 57: struct msc *bsc_nat_msc_add_from_addr_book(struct bsc_nat *bsc_nat);
I wonder what is this function doing.
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27473/comment/a1410564_d67bbe2d
PS1, Line 58: struct msc *bsc_nat_msc_get(struct bsc_nat *bsc_nat);
you get it identified by nothing?
File src/osmo-bsc-nat/bsc_nat.c:
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27473/comment/592e1021_235ac302
PS1, Line 70: struct msc *bsc_nat_msc_add_from_addr_book(struct bsc_nat *bsc_nat)
Not sure we really need this function, just use the content directly, since this will go away at some point afaiu.
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27473/comment/332d2787_1688ebb6
PS1, Line 93: void bsc_nat_msc_del(struct bsc_nat *bsc_nat, struct msc *msc)
IMHO this should be an API of the MSC object (see the bsc_nat is actually not used at all). We usually do it that way.
msc_free(struct msc *msc);
Same for the "bsc" object.
File src/osmo-bsc-nat/main.c:
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27473/comment/4c156774_aac1655e
PS1, Line 202: if (!bsc_nat_msc_add_from_addr_book(g_bsc_nat))
You can probably call the content of the function here directly. It's not going to be used elsewhere anyway.
File src/osmo-bsc-nat/msc_fsm.c:
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27473/comment/67deaa01_4cb05f9b
PS1, Line 44: { 0, NULL }
this half done FSM shouldn't be submitted this way. Better add all the content in the commit adding something useful here.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27473
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc-nat
Gerrit-Branch: master
Gerrit-Change-Id: I711df0c649728f1007857fbfda500ed5ef69287b
Gerrit-Change-Number: 27473
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Mar 2022 15:18:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: osmith.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27472 )
Change subject: Store BSCs
......................................................................
Patch Set 1: Code-Review-1
(3 comments)
File include/osmocom/bsc_nat/bsc_nat.h:
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27472/comment/5f13e937_5b915965
PS1, Line 43: struct llist_head bscs; /* list of struct bsc */
I think we usually would use bsc_list here, but not critical.
File src/osmo-bsc-nat/bsc_nat.c:
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27472/comment/b742658a_0cea154a
PS1, Line 94: llist_for_each_entry(bsc, &bsc_nat->bscs, list) {
This needs to be for_each_entry_safe AFAICT, otherwise you get a use-after-free.
File src/osmo-bsc-nat/bssap.c:
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27472/comment/976c3108_fa01707f
PS1, Line 44: bsc = bsc_nat_bsc_add(g_bsc_nat, addr);
could this return null?
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27472
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc-nat
Gerrit-Branch: master
Gerrit-Change-Id: Icd7316c49ef26fb45ad45a2ccc1a7916bfb0a387
Gerrit-Change-Number: 27472
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Mar 2022 15:11:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: osmith.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27471 )
Change subject: Reply to BSC's RESET with RESET ACK directly
......................................................................
Patch Set 1:
(1 comment)
File src/osmo-bsc-nat/bssap.c:
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27471/comment/5117cc6c_02ab11e1
PS1, Line 70: return bssap_ran_rcvmsg_udt(addr, msg, length - sizeof(struct bssmap_header));
shouldn't the length field check in the "if" clause above be checked against sizeof(struct bssmap_header) instead of "< 1"?
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27471
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc-nat
Gerrit-Branch: master
Gerrit-Change-Id: I3223409e25c93b625d67634caf68efe9772e2558
Gerrit-Change-Number: 27471
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Mar 2022 15:07:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: osmith.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27470 )
Change subject: bsc_nat_sccp_inst: local_sccp_addr -> addr
......................................................................
Patch Set 1:
(1 comment)
File include/osmocom/bsc_nat/bsc_nat.h:
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27470/comment/7ff1501e_d827ec2d
PS1, Line 28: struct osmo_sccp_addr addr; /* OsmoBSCNAT's local address */
Maybe loc_addr or local_addr would be more intuitive when reading code.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27470
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc-nat
Gerrit-Branch: master
Gerrit-Change-Id: I3083374d589487ed960507e7a431c45914afc5dd
Gerrit-Change-Number: 27470
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Mar 2022 15:05:04 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: osmith.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27469 )
Change subject: bsc_nat_fsm: split up sccp_sap_up in _cn, _ran
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27469
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc-nat
Gerrit-Branch: master
Gerrit-Change-Id: I8eb8f24ad33a59de8fbaf512547d389ee86c13dc
Gerrit-Change-Number: 27469
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Mar 2022 15:03:44 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: osmith.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27466 )
Change subject: bsc_nat_fsm: log prim_name once, not in each case
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27466
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc-nat
Gerrit-Branch: master
Gerrit-Change-Id: I1f181ff38f86d83969da4e9d3da72dd9d69d298a
Gerrit-Change-Number: 27466
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Mar 2022 15:02:18 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: osmith, fixeria.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27465 )
Change subject: treewide: tweak includes
......................................................................
Patch Set 1: Code-Review-1
(2 comments)
File src/osmo-bsc-nat/bsc_nat.c:
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27465/comment/ee77c545_e51f1696
PS1, Line 23: #include <osmocom/core/talloc.h>
> Usually includes from libraries come first, and then local headers follow.
Ack
File src/osmo-bsc-nat/bsc_nat_fsm.c:
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27465/comment/68dd16af_9f9e3c16
PS1, Line 30: #include <stdint.h>
Same here.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27465
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc-nat
Gerrit-Branch: master
Gerrit-Change-Id: I1a7b95ccb0c87fd53645c72f0c02449e8403043b
Gerrit-Change-Number: 27465
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Mar 2022 15:01:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment