This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.
Neels Hofmeyr nhofmeyr at sysmocom.deOn Wed, Mar 20, 2019 at 08:22:35AM +0100, Harald Welte wrote: > * don't recycle the SCCP local reference (protocol) from the SCCP connection ID (SAP), > but use distinct number spaces for that. Ah. So the proper solution is to be fine with "collisions" because local reference and SAP conn id are distinct number spaces. Ok, but... I know you will probably roll your eyes at least once when reading this mail, and I sympathise, but please bear with me so I can figure out what exactly osmo-msc should do about outgoing SAP conn_id... For me there is still a disconnect in the reasoning. In short, whoever invents SAP conn ids should invent them for both directions. (Nevermind local-reference, only talking SAP conn ID.) In long: Let's focus on that last stage alone, as close as it gets to the message consumer: a) remote peer sends a N-CONNECT. "Things happen" in SCCP, then in the end: libosmo-sccp dispatches me a struct osmo_scu_prim. prim.connect.conn_id contains a number, the SAP connection ID. b) I send an N-CONNECT. I compose an osmo_scu_prim. I put in prim.connect.conn_id a number, the SAP connection ID. "Things happen" to send SCCP. If these SAP conn_ids are of the same number space for incoming and outgoing osmo_scu_prim, which I assume, then why not provide the caller of the SAP API, in that first stage that actually dispatches/receives the struct osmo_scu_prim locally, nevermind the SCCP wiring happening further away, with one common API function to determine an unused local SAP conn_id? [----------osmo-program-----------] SCCP provider SAP API message handler ---------local-ref-----> black --conn_id-> <--------local-ref------ box <-conn_id-- ^ get_unused_sap_conn_id() Am I getting this picture correctly? (ignoring that currently the SCCP provider is also in the same program, incidentally.) That layer violating patch of mine was made from an angle of: "this osmo_user_sap API has to know which struct osmo_scu_prim.*.conn_id already exist, nevermind how they are made. Even if we separate local ref and conn_id later, the knowledge about used conn_ids will still be in this first stage, and the caller should still ask the osmo_user_sap API for an unused SAP conn_id instead of iterating its own object lists." Shouldn't be too hard to separate the SAP conn ID scope from the local-reference scope in libosmo-sccp, if that is needed to allow this in a correct way. Otherwise we only push the mistake into osmo-{bsc,msc} code. Thanks ~N -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.osmocom.org/pipermail/openbsc/attachments/20190320/f93b4784/attachment.bin>