Attention is currently required from: fixeria, lynxis lazus, pespin. neels has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/37724?usp=email )
Change subject: gmm: Introduce interface GMMBSSGP ...................................................................... Patch Set 1: (2 comments) File include/osmocom/gprs/gmm/gmm_prim.h: https://gerrit.osmocom.org/c/libosmo-gprs/+/37724/comment/149760f2_9c7fc81b?usp=email : PS1, Line 369: /* Alloc primitive for GMMBSSGP SAP: */ > I really prefer getting this merged as is since it gives a clear view on the > primitives being expect […] objectively, the names are unusually long indeed. It sounds like fixeria suggests a more maintainable public API. I'm not entirely clear though, fixeria, on what exactly you mean by "let the user fill prim specific fields using designated initializers (or whatever they like)" are we suggesting something like this? ``` my_prim = osmo_gmm_prim_gmmbssgp_alloc(); osmo_gmm_prim_set_bvci(my_prim, my_bvci); osmo_gmm_prim_set_nsei(my_prim, my_nsei); ``` or like this? ``` struct osmo_gprs_gmm_prim_rcu_args { uint16_t bvci; uint16_t nsei; }; my_rcu_args = (struct osmo_gprs_gmm_prim_rcu_args){...}; my_prim = osmo_gsmm_prim_alloc_rcu(&my_rcu_args); ``` Every way does have its own drawbacks and also we don't seem to have a clear culture of one way or the other in osmocom... so i'd let the patch submitter decide on this stuff, as long as it works. For certain, objectively, these names are very very long. It's up in the same category with the osmo-msc logging of context that I wrote back in the days, almost breaching on the unmanageable. File src/gmm/gmm_prim.c: https://gerrit.osmocom.org/c/libosmo-gprs/+/37724/comment/e1d339e7_b5b94dd2?usp=email : PS1, Line 353: gmm_prim->gmmbssgp.nsei = nsei; in here it does look like a lot of repetition that could be more elegant with API like the pseudocode in my other comment -- pass in the OSMO_GPRS_GMM_ constants as arguments instead of adding a lot of binary objects for each constant. -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/37724?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I39045833fd43cfe98cb1a3812fbce3fdcaae6dc6 Gerrit-Change-Number: 37724 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <[email protected]> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <[email protected]> Gerrit-Reviewer: laforge <[email protected]> Gerrit-Reviewer: lynxis lazus <[email protected]> Gerrit-CC: neels <[email protected]> Gerrit-Attention: pespin <[email protected]> Gerrit-Attention: fixeria <[email protected]> Gerrit-Attention: lynxis lazus <[email protected]> Gerrit-Comment-Date: Wed, 14 Aug 2024 01:11:54 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <[email protected]> Comment-In-Reply-To: fixeria <[email protected]>
