Attention is currently required from: pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30216 )
Change subject: tbf_fsm: Move osmo_fsm_inst fi out of struct tbf_fsm_ctx ...................................................................... Patch Set 2: (1 comment) File src/tbf.h: https://gerrit.osmocom.org/c/osmo-pcu/+/30216/comment/48202655_394a8f06 PS1, Line 260: state_fi > It's not the "main" tbf, it's the "state" tbf as its name indicates. FSMs are all about states, so "state FSM/FI" sounds like "butter oil" to me :P What I meant is that the tbf_fsm exists during the whole lifetime of a TBF (so we can call it 'main'), while both ul_ass_fsm and dl_ass_fsm serve their purpose during the assignment period and remain no-op once the assignment is completed. In theory both ul_ass_fsm and dl_ass_fsm can be children FSMs of the tbf_fsm, but of course you would still need to expose their *fi pointers in order to send events to them. > Why allocating the context dynamically if it can be allocated as part of the > tbf struct? there's no need for that. Because this way you're exposing the internal data of the FSMs, which should not be directly accessible by anything else than the FSMs themselves. I have to admit that we do a similar trick with the bitvec's internal data array, so this is not super critical. But still a bit weird. Maybe move those internals to the private/protected part and only expose the *fi pointers? Anyways, not gonna block your patchset. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30216 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I03e691ccf6a94431caa55653349158f5b85db017 Gerrit-Change-Number: 30216 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <[email protected]> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: msuraev <[email protected]> Gerrit-CC: fixeria <[email protected]> Gerrit-Attention: pespin <[email protected]> Gerrit-Comment-Date: Fri, 18 Nov 2022 17:08:40 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <[email protected]> Comment-In-Reply-To: fixeria <[email protected]> Gerrit-MessageType: comment
