lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

September 2024

  • 1 participants
  • 1983 discussions
[XS] Change in pysim[master]: pySim.app: Properly reset card state after reading EID
by laforge 10 Sep '24

10 Sep '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/38053?usp=email ) Change subject: pySim.app: Properly reset card state after reading EID ...................................................................... pySim.app: Properly reset card state after reading EID The code had two problems: * the RESET was only performed in the successful case, but not if some exceptio was raised * the RESET was a low-level reset bypassing the RuntimeState, so the lchan.selected_file was stale afterwards Fixes: Change-Id Idc2ea1d9263f39b3dff403e1535a5e6c4e88b26f Change-Id: Ib23d3d5b58b456a25157a622c1010c81cd8b2213 --- M pySim/app.py 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified dexter: Looks good to me, approved diff --git a/pySim/app.py b/pySim/app.py index 5525cd1..5a93f98 100644 --- a/pySim/app.py +++ b/pySim/app.py @@ -116,6 +116,7 @@ except SwMatchError: # has ISD-R but not a SGP.22/SGP.32 eUICC - maybe SGP.02? pass - card.reset() + finally: + rs.reset() return rs, card -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38053?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ib23d3d5b58b456a25157a622c1010c81cd8b2213 Gerrit-Change-Number: 38053 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1 0
0 0
[S] Change in pysim[master]: pySim.transport: Add support for generic stdout apdu tracer
by laforge 10 Sep '24

10 Sep '24
Attention is currently required from: fixeria. laforge has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/pysim/+/38054?usp=email ) Change subject: pySim.transport: Add support for generic stdout apdu tracer ...................................................................... Patch Set 1: Code-Review+2 (1 comment) File pySim/transport/__init__.py: https://gerrit.osmocom.org/c/pysim/+/38054/comment/f41aa4de_25dddce0?usp=em… : PS1, Line 258: 'apdu_tracer' in kwargs > Wondering when this condition is true. […] we have two different apdu tracers: 1) the early stdout apdu tracer that can be enabled in the transport by this new --apdu-trace command line argument, for all of the programs using pySim.transport 2) the classic one that pySim-shell can enable at the command line with 'set apdu_trace true'. This will be in the kwargs here, and it will print using the cmd2 output functions. The latter was insufficient as it was too late for debugging APDUs generated by pySim startup (like we read ICCID, EID, detect AIDs, etc.). -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38054?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I4bc3d2e023ba360f07f024d7b661a93322f87530 Gerrit-Change-Number: 38054 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Tue, 10 Sep 2024 18:28:49 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[XS] Change in osmo-bsc[master]: tests/ctrl/osmo-bsc-neigh-test.cfg: Fix duplicate <LAC,CI> between bt...
by pespin 10 Sep '24

10 Sep '24
pespin has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-bsc/+/38086?usp=email ) Change subject: tests/ctrl/osmo-bsc-neigh-test.cfg: Fix duplicate <LAC,CI> between bts1 and bts2 ...................................................................... tests/ctrl/osmo-bsc-neigh-test.cfg: Fix duplicate <LAC,CI> between bts1 and bts2 According to TS23.003, CI should be unique in a LAC. Previous commit wrongly introduced a while ago a new "bts 2" with same LAC and CI as "bts 1" in config file. This makes current tests fails once a hashtable is added to lookup bts by lac, since the hashtable code does prepend new bts instead of appending them. As a result, bts 2 is returned instead of bts 1 being previously returned. Fixes: 97ed3c8d971f3c231a1303efe61b3f98116f1e2f Change-Id: I7d1ebd529e050ecb4c14b9d3523637e4c8c87e1d --- M tests/ctrl/osmo-bsc-neigh-test.cfg 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/86/38086/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/38086?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I7d1ebd529e050ecb4c14b9d3523637e4c8c87e1d Gerrit-Change-Number: 38086 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-CC: Jenkins Builder
1 0
0 0
[XS] Change in osmo-bsc[master]: tests/ctrl/osmo-bsc-neigh-test.cfg: Fix duplicate <LAC,CI> between bt...
by pespin 10 Sep '24

10 Sep '24
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/38086?usp=email ) Change subject: tests/ctrl/osmo-bsc-neigh-test.cfg: Fix duplicate <LAC,CI> between bts1 and bts2 ...................................................................... tests/ctrl/osmo-bsc-neigh-test.cfg: Fix duplicate <LAC,CI> between bts1 and bts2 According to TS23.003, CI should be unique in a LAC. Previous commit wrongly introduced a while ago a new "bts 2" with same LAC and CI as "bts 1" in config file. This makes current tests fails once a hashtable is added to lookup bts by lac, since the hashtable code does prepend new bts instead of appending them. As a result, bts 2 is returned instead of bts 1 being previously returned. Change-Id: I7d1ebd529e050ecb4c14b9d3523637e4c8c87e1d --- M tests/ctrl/osmo-bsc-neigh-test.cfg 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/86/38086/1 diff --git a/tests/ctrl/osmo-bsc-neigh-test.cfg b/tests/ctrl/osmo-bsc-neigh-test.cfg index d6a5c9d..8361c9f 100644 --- a/tests/ctrl/osmo-bsc-neigh-test.cfg +++ b/tests/ctrl/osmo-bsc-neigh-test.cfg @@ -137,7 +137,7 @@ bts 2 type osmo-bts band DCS1800 - cell_identity 123 + cell_identity 124 location_area_code 0x0001 base_station_id_code 55 ms max power 15 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/38086?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I7d1ebd529e050ecb4c14b9d3523637e4c8c87e1d Gerrit-Change-Number: 38086 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-bsc[master]: Introduce hashtable to lookup bts by LAC
by pespin 10 Sep '24

10 Sep '24
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/38087?usp=email ) Change subject: Introduce hashtable to lookup bts by LAC ...................................................................... Introduce hashtable to lookup bts by LAC Related: SYS#7062 Change-Id: Id523027b49e0f58cd2c8c9b4dee619de415dbd15 --- M include/osmocom/bsc/bts.h M include/osmocom/bsc/gsm_data.h M src/osmo-bsc/bts.c M src/osmo-bsc/bts_vty.c M src/osmo-bsc/neighbor_ident.c M src/osmo-bsc/net_init.c M src/osmo-bsc/osmo_bsc_bssap.c 7 files changed, 15 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/87/38087/1 diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h index 8e530ef..9e70ee5 100644 --- a/include/osmocom/bsc/bts.h +++ b/include/osmocom/bsc/bts.h @@ -343,6 +343,8 @@ /*! Entry in hash table network->bts_by_nr. */ struct hlist_node node_by_nr; + /*! Entry in hash table network->bts_by_lac. */ + struct hlist_node node_by_lac; /* number of this BTS in network */ gsm_bts_nr_t nr; diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 008130e..a0bb3ec 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -988,6 +988,7 @@ struct llist_head bts_list; struct llist_head bts_rejected; DECLARE_HASHTABLE(bts_by_nr, 6); + DECLARE_HASHTABLE(bts_by_lac, 6); /* BTS-based counters when we can't find the actual BTS * e.g. when conn->lchan is NULL */ diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c index 38e5f11..11aced4 100644 --- a/src/osmo-bsc/bts.c +++ b/src/osmo-bsc/bts.c @@ -160,6 +160,7 @@ llist_del(&bts->list); hash_del(&bts->node_by_nr); + hash_del(&bts->node_by_lac); paging_destructor(bts); bts_setup_ramp_remove(bts); @@ -203,6 +204,7 @@ llist_add_tail(&bts->list, &net->bts_list); hash_add(net->bts_by_nr, &bts->node_by_nr, bts->nr); + INIT_HLIST_NODE(&bts->node_by_lac); net->num_bts++; bts->num_trx = 0; diff --git a/src/osmo-bsc/bts_vty.c b/src/osmo-bsc/bts_vty.c index 81c4022..4ef582f 100644 --- a/src/osmo-bsc/bts_vty.c +++ b/src/osmo-bsc/bts_vty.c @@ -278,8 +278,8 @@ X(BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK), "location_area_code (<0-65535>|<0x0000-0xffff>)", "Set the Location Area Code (LAC) of this BTS\n" - "LAC in decimal format\n" - "LAC in hexadecimal format\n") + "LAC in decimal format (default 0, reserved by GSM 04.08)\n" + "LAC in hexadecimal format (default 0x0000, reserved by GSM 04.08)\n") { struct gsm_bts *bts = vty->index; int lac; @@ -293,6 +293,8 @@ } bts->location_area_code = lac; + hash_del(&bts->node_by_lac); + hash_add(bts->network->bts_by_lac, &bts->node_by_lac, bts->location_area_code); return CMD_SUCCESS; } diff --git a/src/osmo-bsc/neighbor_ident.c b/src/osmo-bsc/neighbor_ident.c index 3e42c5f..4d52c50 100644 --- a/src/osmo-bsc/neighbor_ident.c +++ b/src/osmo-bsc/neighbor_ident.c @@ -377,7 +377,7 @@ struct gsm_bts *local_neighbor = NULL; struct gsm0808_cell_id_list2 remote_neighbors = { 0 }; - llist_for_each_entry(bts_tmp, &net->bts_list, list) { + hash_for_each_possible(net->bts_by_lac, bts_tmp, node_by_lac, lac) { if (bts_tmp->location_area_code != lac) continue; if (bts_tmp->cell_identity != cell_id) diff --git a/src/osmo-bsc/net_init.c b/src/osmo-bsc/net_init.c index fc29d43..62b3ee4 100644 --- a/src/osmo-bsc/net_init.c +++ b/src/osmo-bsc/net_init.c @@ -125,6 +125,7 @@ INIT_LLIST_HEAD(&net->bts_list); net->num_bts = 0; hash_init(net->bts_by_nr); + hash_init(net->bts_by_lac); net->T_defs = gsm_network_T_defs; osmo_tdefs_reset(net->T_defs); diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index c9e8e5e..82bdeb7 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -150,7 +150,7 @@ if (!osmo_plmn_cmp(&id->lai.plmn, &bsc_gsmnet->plmn)) { int paged = 0; struct gsm_bts *bts; - llist_for_each_entry(bts, &bsc_gsmnet->bts_list, list) { + hash_for_each_possible(bsc_gsmnet->bts_by_lac, bts, node_by_lac, id->lai.lac) { if (bts->location_area_code != id->lai.lac) continue; if (bts->cell_identity != id->cell_identity) @@ -179,7 +179,7 @@ const struct osmo_lac_and_ci_id *id = &params->cil.id_list[i].lac_and_ci; int paged = 0; struct gsm_bts *bts; - llist_for_each_entry(bts, &bsc_gsmnet->bts_list, list) { + hash_for_each_possible(bsc_gsmnet->bts_by_lac, bts, node_by_lac, id->lac) { if (bts->location_area_code != id->lac) continue; if (bts->cell_identity != id->ci) @@ -222,7 +222,7 @@ if (!osmo_plmn_cmp(&id->plmn, &bsc_gsmnet->plmn)) { int paged = 0; struct gsm_bts *bts; - llist_for_each_entry(bts, &bsc_gsmnet->bts_list, list) { + hash_for_each_possible(bsc_gsmnet->bts_by_lac, bts, node_by_lac, id->lac) { if (bts->location_area_code != id->lac) continue; page_subscriber(params, bts, id->lac); @@ -248,7 +248,7 @@ uint16_t lac = params->cil.id_list[i].lac; int paged = 0; struct gsm_bts *bts; - llist_for_each_entry(bts, &bsc_gsmnet->bts_list, list) { + hash_for_each_possible(bsc_gsmnet->bts_by_lac, bts, node_by_lac, lac) { if (bts->location_area_code != lac) continue; page_subscriber(params, bts, lac); -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/38087?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Id523027b49e0f58cd2c8c9b4dee619de415dbd15 Gerrit-Change-Number: 38087 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[XS] Change in osmo-bsc[master]: bsc_vty: Use gsm_bts_num() in ho_or_as()
by fixeria 10 Sep '24

10 Sep '24
Attention is currently required from: pespin. fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-bsc/+/38080?usp=email ) Change subject: bsc_vty: Use gsm_bts_num() in ho_or_as() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/38080?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I49856a417a2be3a10c3bdf2553c52064f875ef94 Gerrit-Change-Number: 38080 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 10 Sep 2024 17:51:54 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in osmo-bsc[master]: pcu_tx_rach_ind(): Avoid forwarding chan_rqd to PCU if not expected
by fixeria 10 Sep '24

10 Sep '24
Attention is currently required from: dexter, pespin. fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-bsc/+/38076?usp=email ) Change subject: pcu_tx_rach_ind(): Avoid forwarding chan_rqd to PCU if not expected ...................................................................... Patch Set 1: (1 comment) File src/osmo-bsc/pcu_sock.c: https://gerrit.osmocom.org/c/osmo-bsc/+/38076/comment/4baa3fc8_d37b20d0?usp… : PS1, Line 426: bsc_co_located_pcu > That's too late, since you don't have bts information there, only the uint8_t bts_nr which is alread […] Ack, fine then. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/38076?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ic12aa9842227b2d815bb91f8587c8b258d07f169 Gerrit-Change-Number: 38076 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 10 Sep 2024 17:50:56 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-bsc[master]: gsm_bts_num(): use hashtable to lookup bts
by pespin 10 Sep '24

10 Sep '24
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/38085?usp=email ) Change subject: gsm_bts_num(): use hashtable to lookup bts ...................................................................... gsm_bts_num(): use hashtable to lookup bts gsm_bts_num() is mostly used to lookup bts object from its nr in VTY and CTRL interfaces. However, it's also used in hotter paths like pcu_rx(). It is also used during local neighbor resolution, mostly at startup or when the VTY is re-applied from CTRL interface. Related: SYS#7062 Change-Id: I7312da7d9aa80c6d0f2e92e9c7d20d32ce453ad1 --- M include/osmocom/bsc/bts.h M include/osmocom/bsc/gsm_data.h M src/osmo-bsc/bts.c M src/osmo-bsc/gsm_data.c M src/osmo-bsc/net_init.c 5 files changed, 12 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/85/38085/1 diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h index 38e675a..8e530ef 100644 --- a/include/osmocom/bsc/bts.h +++ b/include/osmocom/bsc/bts.h @@ -5,6 +5,7 @@ #include <stdbool.h> #include <osmocom/core/linuxlist.h> +#include <osmocom/core/hashtable.h> #include <osmocom/core/msgb.h> #include <osmocom/core/bitvec.h> #include <osmocom/gsm/tlv.h> @@ -340,6 +341,9 @@ /* Geographical location of the BTS, head list of "struct bts_location" */ struct llist_head loc_list; + /*! Entry in hash table network->bts_by_nr. */ + struct hlist_node node_by_nr; + /* number of this BTS in network */ gsm_bts_nr_t nr; /* human readable name / description */ diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 715e8c9..008130e 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -20,6 +20,7 @@ #include <osmocom/core/tdef.h> #include <osmocom/core/time_cc.h> #include <osmocom/core/linuxlist.h> +#include <osmocom/core/hashtable.h> #include <osmocom/core/linuxrbtree.h> #include <osmocom/core/utils.h> @@ -986,6 +987,7 @@ gsm_bts_nr_t num_bts; struct llist_head bts_list; struct llist_head bts_rejected; + DECLARE_HASHTABLE(bts_by_nr, 6); /* BTS-based counters when we can't find the actual BTS * e.g. when conn->lchan is NULL */ diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c index 790a8d4..38e5f11 100644 --- a/src/osmo-bsc/bts.c +++ b/src/osmo-bsc/bts.c @@ -159,6 +159,7 @@ /* Entries in bts->loc_list are freed by talloc recursively, no need to free them here. */ llist_del(&bts->list); + hash_del(&bts->node_by_nr); paging_destructor(bts); bts_setup_ramp_remove(bts); @@ -198,10 +199,12 @@ talloc_set_destructor(bts, gsm_bts_talloc_destructor); + bts->nr = bts_num; + llist_add_tail(&bts->list, &net->bts_list); + hash_add(net->bts_by_nr, &bts->node_by_nr, bts->nr); net->num_bts++; - bts->nr = bts_num; bts->num_trx = 0; INIT_LLIST_HEAD(&bts->trx_list); bts->network = net; diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c index d5c74ad..d725572 100644 --- a/src/osmo-bsc/gsm_data.c +++ b/src/osmo-bsc/gsm_data.c @@ -231,11 +231,10 @@ if (num >= net->num_bts) return NULL; - llist_for_each_entry(bts, &net->bts_list, list) { + hash_for_each_possible(net->bts_by_nr, bts, node_by_nr, num) { if (bts->nr == num) return bts; } - return NULL; } diff --git a/src/osmo-bsc/net_init.c b/src/osmo-bsc/net_init.c index e5d3fad..fc29d43 100644 --- a/src/osmo-bsc/net_init.c +++ b/src/osmo-bsc/net_init.c @@ -124,6 +124,7 @@ INIT_LLIST_HEAD(&net->bts_list); net->num_bts = 0; + hash_init(net->bts_by_nr); net->T_defs = gsm_network_T_defs; osmo_tdefs_reset(net->T_defs); -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/38085?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I7312da7d9aa80c6d0f2e92e9c7d20d32ce453ad1 Gerrit-Change-Number: 38085 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-bsc[master]: bts: Remove from net->bts_list during talloc destructor
by pespin 10 Sep '24

10 Sep '24
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/38083?usp=email ) Change subject: bts: Remove from net->bts_list during talloc destructor ...................................................................... bts: Remove from net->bts_list during talloc destructor This went unnoticed because so far there's not clear way to free a BTS, eg. through VTY. Change-Id: I2bb1d51541c79e417c0359830e9f095be4669867 --- M src/osmo-bsc/bts.c M src/osmo-bsc/gsm_data.c M tests/acc/acc_test.c M tests/gsm0408/gsm0408_test.c M tests/paging/paging_test.c 5 files changed, 5 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/83/38083/1 diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c index 0d33427..50a8579 100644 --- a/src/osmo-bsc/bts.c +++ b/src/osmo-bsc/bts.c @@ -158,6 +158,8 @@ { /* Entries in bts->loc_list are freed by talloc recursively, no need to free them here. */ + llist_del(&bts->list); + paging_destructor(bts); bts_setup_ramp_remove(bts); @@ -193,6 +195,9 @@ talloc_set_destructor(bts, gsm_bts_talloc_destructor); + llist_add_tail(&bts->list, &net->bts_list); + net->num_bts++; + bts->nr = bts_num; bts->num_trx = 0; INIT_LLIST_HEAD(&bts->trx_list); diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c index 87e3893..d5c74ad 100644 --- a/src/osmo-bsc/gsm_data.c +++ b/src/osmo-bsc/gsm_data.c @@ -96,14 +96,10 @@ return NULL; bts = bts_sm->bts[0]; - net->num_bts++; - bts->type = type; gsm_set_bts_model(bts, model); bts->bsic = bsic; - llist_add_tail(&bts->list, &net->bts_list); - return bts; } diff --git a/tests/acc/acc_test.c b/tests/acc/acc_test.c index 887e891..3dcdc1b 100644 --- a/tests/acc/acc_test.c +++ b/tests/acc/acc_test.c @@ -60,7 +60,6 @@ { osmo_timer_del(&bts->acc_mgr.rotate_timer); osmo_timer_del(&bts->acc_ramp.step_timer); - /* no need to llist_del(&bts->list), we never registered the bts there. */ talloc_free(bts->site_mgr); fprintf(stderr, "BTS deallocated OK in %s()\n", msg); } diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c index a39f8c2..b35df60 100644 --- a/tests/gsm0408/gsm0408_test.c +++ b/tests/gsm0408/gsm0408_test.c @@ -138,7 +138,6 @@ static inline void _bts_del(struct gsm_bts *bts, const char *msg) { osmo_timer_del(&bts->acc_mgr.rotate_timer); - /* no need to llist_del(&bts->list), we never registered the bts there. */ talloc_free(bts->site_mgr); printf("BTS deallocated OK in %s()\n", msg); } diff --git a/tests/paging/paging_test.c b/tests/paging/paging_test.c index 80aaee1..dae3499 100644 --- a/tests/paging/paging_test.c +++ b/tests/paging/paging_test.c @@ -97,7 +97,6 @@ #define bts_del(bts) _bts_del(bts, __func__) static inline void _bts_del(struct gsm_bts *bts, const char *msg) { - /* no need to llist_del(&bts->list), we never registered the bts there. */ talloc_free(bts->site_mgr); fprintf(stderr, "BTS deallocated OK in %s()\n", msg); } -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/38083?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I2bb1d51541c79e417c0359830e9f095be4669867 Gerrit-Change-Number: 38083 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-bsc[master]: bts: Remove acc timers during talloc destructor
by pespin 10 Sep '24

10 Sep '24
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/38084?usp=email ) Change subject: bts: Remove acc timers during talloc destructor ...................................................................... bts: Remove acc timers during talloc destructor This went unnoticed because so far there's not clear way to free a BTS, eg. through VTY. Change-Id: I0f94d8fc775953ee98eebc4d80f825404c4f92b2 --- M include/osmocom/bsc/acc.h M src/osmo-bsc/acc.c M src/osmo-bsc/bts.c M tests/acc/acc_test.c M tests/gsm0408/gsm0408_test.c 5 files changed, 21 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/84/38084/1 diff --git a/include/osmocom/bsc/acc.h b/include/osmocom/bsc/acc.h index 531a69a..5674825 100644 --- a/include/osmocom/bsc/acc.h +++ b/include/osmocom/bsc/acc.h @@ -53,6 +53,7 @@ }; void acc_mgr_init(struct acc_mgr *acc_mgr, struct gsm_bts *bts); +void acc_mgr_deinit(struct acc_mgr *acc_mgr); uint8_t acc_mgr_get_len_allowed_adm(struct acc_mgr *acc_mgr); uint8_t acc_mgr_get_len_allowed_ramp(struct acc_mgr *acc_mgr); void acc_mgr_set_len_allowed_adm(struct acc_mgr *acc_mgr, uint8_t len_allowed_adm); @@ -164,6 +165,7 @@ void acc_ramp_global_init(void); void acc_ramp_init(struct acc_ramp *acc_ramp, struct gsm_bts *bts); +void acc_ramp_deinit(struct acc_ramp *acc_ramp); int acc_ramp_set_step_size(struct acc_ramp *acc_ramp, unsigned int step_size); int acc_ramp_set_step_interval(struct acc_ramp *acc_ramp, unsigned int step_interval); int acc_ramp_set_chan_load_thresholds(struct acc_ramp *acc_ramp, unsigned int low_threshold, unsigned int up_threshold); diff --git a/src/osmo-bsc/acc.c b/src/osmo-bsc/acc.c index 80a3576..4b5aba0 100644 --- a/src/osmo-bsc/acc.c +++ b/src/osmo-bsc/acc.c @@ -296,6 +296,11 @@ acc_mgr_gen_subset(acc_mgr, false); } +void acc_mgr_deinit(struct acc_mgr *acc_mgr) +{ + osmo_timer_del(&acc_mgr->rotate_timer); +} + uint8_t acc_mgr_get_len_allowed_adm(struct acc_mgr *acc_mgr) { return acc_mgr->len_allowed_adm; @@ -475,6 +480,17 @@ } /*! + * Deinitialize an acc_ramp data structure. + * Called when the user is going to free the structure. + * + * \param[in] acc_ramp Pointer to acc_ramp structure to be deinitialized. + */ +void acc_ramp_deinit(struct acc_ramp *acc_ramp) +{ + osmo_timer_del(&acc_ramp->step_timer); +} + +/*! * Change the ramping step size which controls how many ACCs will be allowed per ramping step. * Returns negative on error (step_size out of range), else zero. * \param[in] acc_ramp Pointer to acc_ramp structure. diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c index 50a8579..790a8d4 100644 --- a/src/osmo-bsc/bts.c +++ b/src/osmo-bsc/bts.c @@ -163,6 +163,9 @@ paging_destructor(bts); bts_setup_ramp_remove(bts); + acc_ramp_deinit(&bts->acc_ramp); + acc_mgr_deinit(&bts->acc_mgr); + osmo_timer_del(&bts->cbch_timer); bts->site_mgr->bts[0] = NULL; diff --git a/tests/acc/acc_test.c b/tests/acc/acc_test.c index 3dcdc1b..84a63b0 100644 --- a/tests/acc/acc_test.c +++ b/tests/acc/acc_test.c @@ -58,8 +58,6 @@ #define bts_del(bts) _bts_del(bts, __func__) static inline void _bts_del(struct gsm_bts *bts, const char *msg) { - osmo_timer_del(&bts->acc_mgr.rotate_timer); - osmo_timer_del(&bts->acc_ramp.step_timer); talloc_free(bts->site_mgr); fprintf(stderr, "BTS deallocated OK in %s()\n", msg); } diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c index b35df60..4f4b4d4 100644 --- a/tests/gsm0408/gsm0408_test.c +++ b/tests/gsm0408/gsm0408_test.c @@ -137,7 +137,6 @@ #define bts_del(bts) _bts_del(bts, __func__) static inline void _bts_del(struct gsm_bts *bts, const char *msg) { - osmo_timer_del(&bts->acc_mgr.rotate_timer); talloc_free(bts->site_mgr); printf("BTS deallocated OK in %s()\n", msg); } -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/38084?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I0f94d8fc775953ee98eebc4d80f825404c4f92b2 Gerrit-Change-Number: 38084 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • ...
  • 199
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.