osmo-bsc/include/osmocom/bsc
Pau Espin 9f7611a32f Fix Lb/A SCCP conn lookup after recent regression in optimization patch
In osmo-bsc, there's currently 0..1 Lb links and 0..N A links, where N
is the number of MSC, but links can be shared in the underlaying stack
(struct osmo_sccp_instance), hence range 0..N of different
osmo_sccp_instance (identified by PC).
Even more, the Lb and A link can share the same underlaying stack, so
osmo-bsc can end up with only 1 struct osmo_sccp_instance shared by all
the above mentioned links in case all are configured under the same PC.
Total range A+Lb is 0..(1+N).

A struct gsm_subscriber_conn stores 2 struct sccp_instance*, one for
Lb (conn->lcs.lb.*)and one for A (conn->sccp.*).
They can actually point to the same sccp_instance or to different ones,
as explained above, depending on the configured setup. In any case, a
gsm_subscriber_conn needs 2 rb_nodes since it can hold
any of the 2 conn_ids independently (A or Lb).

The previous patch forgot to add that 2nd rb_node as well as some
initialization and release code for the Lb conn. This patch addresses
that.

When the 2nd rb_node, a problem when iterating the rbtree appears: how to
find out the "conn" pointer from the rb_node pointer, since the rb_node pointer
can be any of the 2 rb_nodes inside the struct at a different offsets.

In order to solve that problem, a new struct bscp_sccp_conn_node is
added, which holds all the relevant information used by the rbtree lookup code
in a generic way (rb_node and conn_id), plus a backpointer to the struct
bsc_gsm_subcriber it relates too.

Fixes: 85062ccad3
Change-Id: If42d93adee71d646766929a09bc01ae92b734ef3
2023-03-17 18:08:26 +00:00
..
Makefile.am bssmap_handle_ass_req_ct_data: implement 2023-03-06 10:23:26 +01:00
a_reset.h BSSMAP RESET: generalize a_reset FSM 2020-10-15 05:28:24 +02:00
abis_nm.h ipa: Fix use of null pointer in log macro 2020-10-17 13:56:16 +00:00
abis_om2000.h Add command to enable RX diversity to RBS2000 2021-03-15 18:50:32 +00:00
abis_osmo.h Support proto IPAC_PROTO_EXT_PCU BSC<->PCU 2021-06-30 08:13:37 +00:00
abis_rsl.h abis_rsl: CSD: add RTP_CSD_FMT IE to CRCX/MDCX 2023-03-08 11:52:12 +00:00
acc.h acc: Fix erratic ramping behavior when several BTS configured 2022-05-06 12:34:59 +00:00
assignment_fsm.h bsc_test.c: test FSM IDs that contain pchan names 2023-03-04 22:44:10 +00:00
bsc_msc_data.h simplify storage of bsc_msc_data->audio_support 2023-03-04 22:44:10 +00:00
bsc_rll.h move include/openbsc to include/osmocom/bsc 2017-09-06 16:26:13 +02:00
bsc_stats.h Support building with -Werror=strict-prototypes / -Werror=old-style-definition 2022-11-10 00:28:46 +00:00
bsc_subscr_conn_fsm.h implicitly register osmo_fsm definitions 2023-03-02 17:56:48 +01:00
bsc_subscriber.h bsc_subscriber: Optimize lookup of bsub by TMSI 2023-03-15 10:45:13 +01:00
bss.h Replace all references to 'sysmobts' with 'osmo-bts' 2021-04-12 18:54:40 +00:00
bssmap_reset.h vty: add "msc N bssmap reset" command 2021-08-30 16:18:12 +00:00
bts.h vty: Add check against sensible default value for Ny1 2023-01-23 09:59:36 +00:00
bts_ipaccess_nanobts_omlattr.h bts: ipa/osmo-bts/sysmobts: MO: add support for the second NSVC 2023-01-03 09:13:52 +00:00
bts_setup_ramp.h Add BTS setup ramping to prevent BSC overloading 2022-11-15 11:32:16 +00:00
bts_sm.h Introduce NM GPRS NSVC FSM 2020-12-04 14:44:40 +01:00
bts_trx.h bts_chan_load(): also calculate per-TRX channel load 2022-06-22 05:49:20 +07:00
chan_alloc.h chan_alloc: remove references to lchan_alloc() 2019-01-17 15:52:25 +01:00
chan_counts.h Support building with -Werror=strict-prototypes / -Werror=old-style-definition 2022-11-10 00:28:46 +00:00
codec_pref.h bssmap_handle_ass_req_ct_data: implement 2023-03-06 10:23:26 +01:00
ctrl.h ctrl: take both address and port from vty config 2022-12-20 15:22:23 +00:00
data_rate_pref.h bssmap_handle_ass_req_ct_data: implement 2023-03-06 10:23:26 +01:00
debug.h Implement MS Uplink Power Control Loop 2021-10-05 04:32:33 +00:00
e1_config.h libcommon: join gsm_data_shared.* into gsm_data.* 2018-02-14 12:15:40 +01:00
gsm_04_08_rr.h gsm48_make_ho_cmd(): optionally add Synchronization Indication IE 2022-03-14 14:07:39 +03:00
gsm_08_08.h requires_voice_stream -> ch_indctr 2023-03-06 10:23:30 +01:00
gsm_data.h Fix Lb/A SCCP conn lookup after recent regression in optimization patch 2023-03-17 18:08:26 +00:00
handover.h for linter: s/while(0)/while (0) 2021-11-06 17:01:58 +01:00
handover_cfg.h hodec2: add penalty-time low-rxqual-ho 2022-03-31 14:43:48 +00:00
handover_ctrl.h handover_ctrl: add control interface for handover settings 2021-07-19 10:44:05 +02:00
handover_decision.h HO: make bts_by_arfcn_bsic() public 2018-01-19 22:09:19 +00:00
handover_decision_2.h HO: Implement load based handover, as handover_decision_2.c 2018-02-19 17:11:47 +01:00
handover_fsm.h implicitly register osmo_fsm definitions 2023-03-02 17:56:48 +01:00
handover_vty.h Support building with -Werror=strict-prototypes / -Werror=old-style-definition 2022-11-10 00:28:46 +00:00
ipaccess.h IPA: log OML/RSL link drop reason 2019-01-03 19:10:58 +00:00
lb.h Support building with -Werror=strict-prototypes / -Werror=old-style-definition 2022-11-10 00:28:46 +00:00
lchan.h abis_rsl: CSD: add RTP_CSD_FMT IE to CRCX/MDCX 2023-03-08 11:52:12 +00:00
lchan_fsm.h implicitly register osmo_fsm definitions 2023-03-02 17:56:48 +01:00
lchan_rtp_fsm.h mgcp: Set up Osmux only when AMR codec is selected 2022-09-19 20:16:22 +02:00
lchan_select.h lchan_select: implement dynamic selection mode for assignment 2022-06-30 16:36:55 +00:00
lcs_loc_req.h BSSMAP LE: handle optional LCS {Client Type, QoS} IEs 2022-03-22 19:17:44 +03:00
lcs_ta_req.h for linter: s/while(0)/while (0) 2021-11-06 17:01:58 +01:00
meas_feed.h Fix some typos 2019-11-13 22:10:41 +01:00
meas_rep.h hodec2: [2/2] implement automatic choice between FULL and SUBSET measurements 2021-07-09 11:51:40 +00:00
misdn.h move include/openbsc to include/osmocom/bsc 2017-09-06 16:26:13 +02:00
neighbor_ident.h Support building with -Werror=strict-prototypes / -Werror=old-style-definition 2022-11-10 00:28:46 +00:00
network_listen.h move include/openbsc to include/osmocom/bsc 2017-09-06 16:26:13 +02:00
nm_common_fsm.h Add BTS setup ramping to prevent BSC overloading 2022-11-15 11:32:16 +00:00
openbscdefines.h move include/openbsc to include/osmocom/bsc 2017-09-06 16:26:13 +02:00
osmo_bsc.h Support building with -Werror=strict-prototypes / -Werror=old-style-definition 2022-11-10 00:28:46 +00:00
osmo_bsc_grace.h dissolve bsc_grace_paging_request() 2020-09-16 21:54:52 +00:00
osmo_bsc_lcls.h Move LCLS references from gsm_data to osmo_bsc_lcls 2019-03-14 13:21:19 +00:00
osmo_bsc_rf.h add CTRL 'rf_states' and 'bts.N.rf_states' 2021-09-14 08:44:45 +00:00
osmo_bsc_sigtran.h Move bsc_conn_by_bsub() and make it static 2023-03-15 09:44:22 +00:00
osmux.h vty: Add option to enable osmux towards MSC 2019-05-19 07:26:28 +00:00
paging.h paging: Optimize retrieving number of request per paging group 2022-11-30 20:23:39 +01:00
pcu_if.h pcu_sock: activate/deactivate PDCH on pcu reconnect 2023-03-07 12:54:58 +00:00
pcuif_proto.h pcu_sock: use struct to transfer IMMEDIATE ASSIGNMENT for PCH 2023-03-07 12:54:58 +00:00
penalty_timers.h refactor handover penalty timers 2021-03-24 10:02:29 +01:00
power_control.h Move power control related definitions to power_control.h 2022-04-08 01:23:04 +03:00
rs232.h move include/openbsc to include/osmocom/bsc 2017-09-06 16:26:13 +02:00
signal.h oml: Integrate signal S_NM_IPACC_SET_ATTR_ACK inside S_NM_IPACC_ACK 2022-09-16 13:00:58 +02:00
smscb.h smscb: Base cell operational life cycle on CBCH being operative 2022-06-16 19:07:14 +02:00
system_information.h gsm48_parse_meas_rep: fix parsing multi-band list 2022-10-27 09:19:52 +00:00
timeslot_fsm.h pcu_sock: activate/deactivate PDCH on pcu reconnect 2023-03-07 12:54:58 +00:00
vty.h cosmetic: Fix indentation whitespace 2022-10-18 13:55:28 +02:00