[L] Change in osmo-bsc[master]: ASCI: Add System Information 10 support
jolly has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email ) Change subject: ASCI: Add System Information 10 support .. ASCI: Add System Information 10 support For each BTS, an SI 10 is generated with the informations about all neighbor BTS that have the same group/broadcast call. The SI 10 will only define neighbor cells within the same BSC, because it does not know about neighbor cells within other BSCs. When multiple channels are used for a group/broadcast call, the SI 10 is generated after all channels have been activated. Subsequent channel activations result in an update of SI 10 on all channels. Change-Id: Icd3101e6dd935a57f003253aaef400c2cf95a0c3 --- M include/osmocom/bsc/system_information.h M src/osmo-bsc/system_information.c M src/osmo-bsc/vgcs_fsm.c 3 files changed, 331 insertions(+), 2 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/system_information.h b/include/osmocom/bsc/system_information.h index f74ef6d..46213f6 100644 --- a/include/osmocom/bsc/system_information.h +++ b/include/osmocom/bsc/system_information.h @@ -5,12 +5,17 @@ #include +/* Complete length of SYSTEM INFORMATION 10 (SACCH) */ +#define SI10_LENGTH21 + struct gsm_bts; int band_compatible(const struct gsm_bts *bts, int arfcn); int generate_cell_chan_alloc(struct gsm_bts *bts); int generate_cell_chan_list(uint8_t *chan_list, struct gsm_bts *bts); int gsm_generate_si(struct gsm_bts *bts, enum osmo_sysinfo_type type); +int gsm_generate_si10(struct gsm48_system_information_type_10 *si10, size_t len, + const struct gsm_subscriber_connection *conn); size_t si2q_earfcn_count(const struct osmo_earfcn_si2q *e); unsigned range1024_p(unsigned n); unsigned range512_q(unsigned m); diff --git a/src/osmo-bsc/system_information.c b/src/osmo-bsc/system_information.c index 94205aa..477e9fa 100644 --- a/src/osmo-bsc/system_information.c +++ b/src/osmo-bsc/system_information.c @@ -1246,6 +1246,269 @@ return l2_plen + rc; } +static int si10_rest_octets_encode(struct gsm_bts *s_bts, struct bitvec *bv, struct gsm_bts *n_bts, uint8_t index) +{ + /* The BA-IND must be equal to the BA-IND in SI5*. */ + /* */ + bitvec_set_bit(bv, 1); + + /* Do we have neighbor cells ? */ + /* { L | H } */ + if (!n_bts) + return 0; + bitvec_set_bit(bv, H); + + /* */ + bitvec_set_uint(bv, index, 5); + + /* */ + bitvec_set_uint(bv, n_bts->bsic, 6); + + /* We do not provide empty cell information. */ + /* { H | L } */ + bitvec_set_bit(bv, H); + + /* If cell is barred, we do not need further cell info. */ + /* | L */ + if (n_bts->si_common.rach_control.cell_bar) { + /* H */ + bitvec_set_bit(bv, H); + /* We are done with the first cell info. */ + return 0; + } + bitvec_set_bit(bv, L); + + /* If LA is different for serving cell, we need to add CRH. */ + /* { H | L } */ + if (s_bts->location_area_code != n_bts->location_area_code) { + bitvec_set_bit(bv, H); + bitvec_set_uint(bv, n_bts->si_common.cell_sel_par.cell_resel_hyst, 3); + } else + bitvec_set_bit(bv, L); + + /* */ + bitvec_set_uint(bv, n_bts->si_common.cell_sel_par.ms_txpwr_max_ccch, 5); + + /* */ + bitvec_set_uint(bv, n_bts->si_common.cell_sel_par.rxlev_acc_min, 6); + + /* */ + if (n_bts->si_common.cell_ro_sel_par.present) + bitvec_set_uint(bv, n_bts->si_common.cell_ro_sel_par.cell_resel_off, 6); + else + bitvec_set_uint(bv, 0, 6); + + /* */ + if (n_bts->si_common.cell_ro_sel_par.present) + bitvec_set_uint(bv, n_bts->si_common.cell_ro_sel_par.temp_offs, 3); + else + bitvec_set_uint(bv, 0, 3); + + /* */ + if (n_bts->si_common.cell_ro_sel_par.present) + bitvec_set_uint(bv, n_bts->si_common.cell_ro_sel_par.penalty_time, 5); + else + bitvec_set_uint(bv, 0, 5); + + /* We are done with the first cell info. */ + return 0; +} + +static int si10_rest_octets_encode_other(struct gsm_bts *s_bts, struct bitvec *bv, struct gsm_bts *l_bts, +struct gsm_bts *n_bts, uint8_t last_index, uint8_t index) +{ + int rc; + + /* If the bv buffer would overflow, then the bits are not written. Each bitvec_set_* call will return +* an error code. This error is returned with this function. */ + + /* { H } */ + bitvec_set_bit(bv, H); + + /* How many frequency indices do we skip? */ + /* ** L */ + while ((last_index = (last_index
[L] Change in osmo-bsc[master]: ASCI: Add System Information 10 support
Attention is currently required from: jolly, laforge. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email ) Change subject: ASCI: Add System Information 10 support .. Patch Set 7: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Icd3101e6dd935a57f003253aaef400c2cf95a0c3 Gerrit-Change-Number: 34626 Gerrit-PatchSet: 7 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Attention: jolly Gerrit-Attention: laforge Gerrit-Comment-Date: Mon, 23 Oct 2023 09:54:51 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[L] Change in osmo-bsc[master]: ASCI: Add System Information 10 support
Attention is currently required from: fixeria, jolly, laforge. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email ) Change subject: ASCI: Add System Information 10 support .. Patch Set 7: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Icd3101e6dd935a57f003253aaef400c2cf95a0c3 Gerrit-Change-Number: 34626 Gerrit-PatchSet: 7 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Attention: jolly Gerrit-Attention: laforge Gerrit-Attention: fixeria Gerrit-Comment-Date: Mon, 23 Oct 2023 09:33:48 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[L] Change in osmo-bsc[master]: ASCI: Add System Information 10 support
Attention is currently required from: fixeria, laforge, pespin. jolly has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email ) Change subject: ASCI: Add System Information 10 support .. Patch Set 6: (4 comments) File src/osmo-bsc/system_information.c: https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/743c260f_8c3fd8c2 PS6, Line 1420: int gsm_generate_si10(uint8_t *data, size_t len, const struct gsm_subscriber_connection *conn) > "struct gsm48_system_information_type_10 *data" ? Done https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/348557ed_bc99cfa9 PS6, Line 1424: struct gsm_bts *s_bts = conn->lchan->ts->trx->bts; > Can conn->lchan be null? […] It can't, because in NULL case, gsm_generate_si10() is not called. This is checked right before calling gsm_generate_si10() in si10_update(). File src/osmo-bsc/vgcs_fsm.c: https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/fee0e98d_1f0b1955 PS6, Line 70: #define SI10_TIMER3, 0 > AFAIU this is no longer used. Done https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/3c3afaf9_58b09456 PS6, Line 71: #define SI10_LENGTH 21 > this length should be in the same header where the API is used, and probably > be documented in the AP […] Done -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Icd3101e6dd935a57f003253aaef400c2cf95a0c3 Gerrit-Change-Number: 34626 Gerrit-PatchSet: 6 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-Attention: laforge Gerrit-Attention: pespin Gerrit-Attention: fixeria Gerrit-Comment-Date: Mon, 23 Oct 2023 09:31:45 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment
[L] Change in osmo-bsc[master]: ASCI: Add System Information 10 support
Attention is currently required from: fixeria, jolly, laforge. Hello Jenkins Builder, fixeria, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email to look at the new patch set (#7). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: ASCI: Add System Information 10 support .. ASCI: Add System Information 10 support For each BTS, an SI 10 is generated with the informations about all neighbor BTS that have the same group/broadcast call. The SI 10 will only define neighbor cells within the same BSC, because it does not know about neighbor cells within other BSCs. When multiple channels are used for a group/broadcast call, the SI 10 is generated after all channels have been activated. Subsequent channel activations result in an update of SI 10 on all channels. Change-Id: Icd3101e6dd935a57f003253aaef400c2cf95a0c3 --- M include/osmocom/bsc/system_information.h M src/osmo-bsc/system_information.c M src/osmo-bsc/vgcs_fsm.c 3 files changed, 331 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/26/34626/7 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Icd3101e6dd935a57f003253aaef400c2cf95a0c3 Gerrit-Change-Number: 34626 Gerrit-PatchSet: 7 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-Attention: jolly Gerrit-Attention: laforge Gerrit-Attention: fixeria Gerrit-MessageType: newpatchset
[L] Change in osmo-bsc[master]: ASCI: Add System Information 10 support
Attention is currently required from: fixeria, jolly, laforge. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email ) Change subject: ASCI: Add System Information 10 support .. Patch Set 6: (4 comments) File src/osmo-bsc/system_information.c: https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/3a994631_16e74711 PS6, Line 1420: int gsm_generate_si10(uint8_t *data, size_t len, const struct gsm_subscriber_connection *conn) "struct gsm48_system_information_type_10 *data" ? https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/6aaafb03_f812b8ce PS6, Line 1424: struct gsm_bts *s_bts = conn->lchan->ts->trx->bts; Can conn->lchan be null? OSMO_ASSERT(conn && conn->lchan) perhaps? File src/osmo-bsc/vgcs_fsm.c: https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/5ca286d7_976722cb PS6, Line 70: #define SI10_TIMER3, 0 AFAIU this is no longer used. https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/982f534c_2e5f996c PS6, Line 71: #define SI10_LENGTH 21 this length should be in the same header where the API is used, and probably be documented in the API that the data buf should be at least this size. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Icd3101e6dd935a57f003253aaef400c2cf95a0c3 Gerrit-Change-Number: 34626 Gerrit-PatchSet: 6 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-Attention: jolly Gerrit-Attention: laforge Gerrit-Attention: fixeria Gerrit-Comment-Date: Thu, 19 Oct 2023 14:38:56 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
[L] Change in osmo-bsc[master]: ASCI: Add System Information 10 support
Attention is currently required from: fixeria, laforge, pespin. jolly has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email ) Change subject: ASCI: Add System Information 10 support .. Patch Set 5: (3 comments) Patchset: PS2: > I don't have a strong preference here... […] There is a better solution, I used to resolve this problem: The channels are activated quite quickly after each other. The BTS will take a while, to acknowledge the channel activations or reject them. The BSC will wait until all requested channels have been activated or rejected. Then the SI10 is generated. This way the SI10 is generated and sent to the BTSs only once. In case the channels are requested with a delay (congestions/errors on the A-Interface), the BSC will generate SI10 as soon as all (so fare) requested channels have been activated or rejected. Then, if more channels get requested by the MSC later, the BSC will update SI10, when all further channels have been activated or rejected. File src/osmo-bsc/system_information.c: https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/0105248a_3ab27112 PS2, Line 1428: unsigned int save_cur_bit; : struct gsm_subscriber_connection *c; > variables should always be declared with the smallest possible scope. […] Done File src/osmo-bsc/system_information.c: https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/baeacfa9_64818519 PS4, Line 1456: llist_for_each_entry(c, >vgcs_chan.call->vgcs_call.chan_list, vgcs_chan.list) { > I always want to separate variables from code. […] Done -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Icd3101e6dd935a57f003253aaef400c2cf95a0c3 Gerrit-Change-Number: 34626 Gerrit-PatchSet: 5 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-Attention: laforge Gerrit-Attention: fixeria Gerrit-Attention: pespin Gerrit-Comment-Date: Thu, 19 Oct 2023 14:22:33 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: jolly Comment-In-Reply-To: laforge Comment-In-Reply-To: fixeria Comment-In-Reply-To: pespin Gerrit-MessageType: comment
[L] Change in osmo-bsc[master]: ASCI: Add System Information 10 support
Attention is currently required from: fixeria, jolly, pespin. Hello Jenkins Builder, fixeria, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email to look at the new patch set (#6). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: ASCI: Add System Information 10 support .. ASCI: Add System Information 10 support A timer is used to wait some seconds before sending SI 10 to all BTS. This ensures that all channels are established by the MSC, before sending a complete list of VGCS/VBS neighbor cells for a call. For each BTS, an SI 10 is generated with all other neighbor BTS. The SI 10 will only define neighbor cells within the same BSC, because it does not know about neighbor cells within other BSCs. Change-Id: Icd3101e6dd935a57f003253aaef400c2cf95a0c3 --- M include/osmocom/bsc/system_information.h M src/osmo-bsc/system_information.c M src/osmo-bsc/vgcs_fsm.c 3 files changed, 329 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/26/34626/6 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Icd3101e6dd935a57f003253aaef400c2cf95a0c3 Gerrit-Change-Number: 34626 Gerrit-PatchSet: 6 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-Attention: jolly Gerrit-Attention: fixeria Gerrit-Attention: pespin Gerrit-MessageType: newpatchset
[L] Change in osmo-bsc[master]: ASCI: Add System Information 10 support
Attention is currently required from: fixeria, jolly, pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email ) Change subject: ASCI: Add System Information 10 support .. Patch Set 5: (1 comment) File src/osmo-bsc/system_information.c: https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/d2efdc06_bf70f3fa PS2, Line 1428: unsigned int save_cur_bit; : struct gsm_subscriber_connection *c; > You could still have them variables defined separately from code within a > for-loop, but it's not rea […] variables should always be declared with the smallest possible scope. So if they are only used within the for-loop, they should be declared on top of the for-loop. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Icd3101e6dd935a57f003253aaef400c2cf95a0c3 Gerrit-Change-Number: 34626 Gerrit-PatchSet: 5 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-Attention: jolly Gerrit-Attention: fixeria Gerrit-Attention: pespin Gerrit-Comment-Date: Thu, 19 Oct 2023 07:34:23 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: jolly Comment-In-Reply-To: fixeria Gerrit-MessageType: comment
[L] Change in osmo-bsc[master]: ASCI: Add System Information 10 support
Attention is currently required from: jolly, laforge, pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email ) Change subject: ASCI: Add System Information 10 support .. Patch Set 5: (3 comments) Patchset: PS2: > The idea was to wait 3 seconds, which allows the MS to receive the SI5* > messages before adding the S […] I don't have a strong preference here... What happens if an MS gets `SI10` before `SI5`? I would expect the phone to ignore `SI10` in this case? Or cache it and postpone handling until `SI5` is received (this is what we do in osmocom-bb.git for `SI3`/`SI4` and `SI1`). Even if `SI10` is ignored when received before `SI5`, the BTS will be broadcasting it repeatedly on SACCH anyway. Based on that, I think we can send it for every channel that is established straightaway, without delaying. File src/osmo-bsc/system_information.c: https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/37ba55da_6389a499 PS2, Line 1428: unsigned int save_cur_bit; : struct gsm_subscriber_connection *c; > I always want to separate variables from code. […] You could still have them variables defined separately from code within a for-loop, but it's not really critical and I am not going to block. Marking as resolved. https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/b61e1262_19347103 PS2, Line 1447: 32 > SI 10 uses channel index with 5 bit. […] Makes sense. Marking as resolved. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Icd3101e6dd935a57f003253aaef400c2cf95a0c3 Gerrit-Change-Number: 34626 Gerrit-PatchSet: 5 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-Attention: jolly Gerrit-Attention: laforge Gerrit-Attention: pespin Gerrit-Comment-Date: Wed, 18 Oct 2023 10:53:26 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: jolly Comment-In-Reply-To: laforge Comment-In-Reply-To: fixeria Comment-In-Reply-To: pespin Gerrit-MessageType: comment
[L] Change in osmo-bsc[master]: ASCI: Add System Information 10 support
Attention is currently required from: fixeria, laforge, pespin. jolly has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email ) Change subject: ASCI: Add System Information 10 support .. Patch Set 4: (4 comments) File src/osmo-bsc/system_information.c: https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/19049463_7a07c8f7 PS2, Line 1428: unsigned int save_cur_bit; : struct gsm_subscriber_connection *c; > both vars can be moved to the scope of use (for-loop) I always want to separate variables from code. Even if it has no performance/memory gain, I want to have variables on top and code below. https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/3b3d2edf_6e44dbaa PS2, Line 1447: 32 > Thanks for adding the comment. I still see a possible problem though. […] SI 10 uses channel index with 5 bit. This means that it can address only the first 32 neighbor channels that are defined by SI5*. It does not make sense that there are more than 32 neighbor cells, because they cannot be reported by measurement report, which uses 5 bits as index too. https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/f43946fb_71499cbe PS2, Line 1499: /* Do spare padding. We cannot do it earlier, because encoding might corrupt it if differenctial cell info > So if you mean "differential", then please use the correct spelling. Done File src/osmo-bsc/system_information.c: https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/cc91560e_f8ce3bbd PS4, Line 1456: llist_for_each_entry(c, >vgcs_chan.call->vgcs_call.chan_list, vgcs_chan.list) { > "struct gsm_bts *c_bts;" can be moved here (loop scope). I always want to separate variables from code. Even if it has no performance/memory gain, I want to have variables on top and code below. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Icd3101e6dd935a57f003253aaef400c2cf95a0c3 Gerrit-Change-Number: 34626 Gerrit-PatchSet: 4 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-Attention: laforge Gerrit-Attention: pespin Gerrit-Attention: fixeria Gerrit-Comment-Date: Mon, 16 Oct 2023 08:44:13 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: jolly Comment-In-Reply-To: laforge Comment-In-Reply-To: fixeria Comment-In-Reply-To: pespin Gerrit-MessageType: comment
[L] Change in osmo-bsc[master]: ASCI: Add System Information 10 support
Attention is currently required from: fixeria, jolly, laforge. Hello Jenkins Builder, fixeria, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email to look at the new patch set (#5). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: ASCI: Add System Information 10 support .. ASCI: Add System Information 10 support A timer is used to wait some seconds before sending SI 10 to all BTS. This ensures that all channels are established by the MSC, before sending a complete list of VGCS/VBS neighbor cells for a call. For each BTS, an SI 10 is generated with all other neighbor BTS. The SI 10 will only define neighbor cells within the same BSC, because it does not know about neighbor cells within other BSCs. Change-Id: Icd3101e6dd935a57f003253aaef400c2cf95a0c3 --- M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/system_information.h M src/osmo-bsc/system_information.c M src/osmo-bsc/vgcs_fsm.c 4 files changed, 316 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/26/34626/5 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Icd3101e6dd935a57f003253aaef400c2cf95a0c3 Gerrit-Change-Number: 34626 Gerrit-PatchSet: 5 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-Attention: jolly Gerrit-Attention: laforge Gerrit-Attention: fixeria Gerrit-MessageType: newpatchset
[L] Change in osmo-bsc[master]: ASCI: Add System Information 10 support
Attention is currently required from: fixeria, jolly, laforge. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email ) Change subject: ASCI: Add System Information 10 support .. Patch Set 4: (2 comments) File src/osmo-bsc/system_information.c: https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/16ca84fe_5f42e97f PS2, Line 1499: /* Do spare padding. We cannot do it earlier, because encoding might corrupt it if differenctial cell info > Indeed, SI10 employs so-called differential encoding: you encode all the info > for the first BTS and […] So if you mean "differential", then please use the correct spelling. File src/osmo-bsc/system_information.c: https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/53519a82_0964f4bf PS4, Line 1456: llist_for_each_entry(c, >vgcs_chan.call->vgcs_call.chan_list, vgcs_chan.list) { "struct gsm_bts *c_bts;" can be moved here (loop scope). -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Icd3101e6dd935a57f003253aaef400c2cf95a0c3 Gerrit-Change-Number: 34626 Gerrit-PatchSet: 4 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-Attention: jolly Gerrit-Attention: laforge Gerrit-Attention: fixeria Gerrit-Comment-Date: Mon, 09 Oct 2023 11:21:43 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge Comment-In-Reply-To: fixeria Comment-In-Reply-To: pespin Gerrit-MessageType: comment
[L] Change in osmo-bsc[master]: ASCI: Add System Information 10 support
Attention is currently required from: jolly, laforge, pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email ) Change subject: ASCI: Add System Information 10 support .. Patch Set 3: (1 comment) File src/osmo-bsc/system_information.c: https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/a2b5c191_3a6660f1 PS2, Line 1447: 32 > Done Thanks for adding the comment. I still see a possible problem though. By doing `< 32` you're actually limiting number the neighbors you check here in this function, not the number of frequencies the SI10 can fit. Imagine having more than 32 neighbors in the list (weird, but still possible, right?). The current logic would not take those neighbors with `i >= 32` into account, despite they could be involved in group calls and could fit. Does that make sense? If yes, just limit to `nbv->data_len * 8` and rely on your overflow detection logic below. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Icd3101e6dd935a57f003253aaef400c2cf95a0c3 Gerrit-Change-Number: 34626 Gerrit-PatchSet: 3 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-Attention: jolly Gerrit-Attention: laforge Gerrit-Attention: pespin Gerrit-Comment-Date: Thu, 05 Oct 2023 14:46:59 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: jolly Comment-In-Reply-To: fixeria Gerrit-MessageType: comment
[L] Change in osmo-bsc[master]: ASCI: Add System Information 10 support
Attention is currently required from: fixeria, laforge, pespin. jolly has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email ) Change subject: ASCI: Add System Information 10 support .. Patch Set 3: (6 comments) Commit Message: https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/42690333_1940fbb5 PS2, Line 13: For each BTS, an SI 10 is gerated with all other neighbor BTS. > generated Done Patchset: PS2: > SI10 is actually not needed for the call establishment, it's needed for > quicker cell change. […] The idea was to wait 3 seconds, which allows the MS to receive the SI5* messages before adding the SI10 (which relates to SI5*). There is not much benefit when sending SI10 earlier. Then I thought that it would be enough time for all the channels to be established in that BSC. There is no way to know at the BSC, if the channels requested from the MSC are complete. I could add an update to the SI10 for every channel that is established after the timer has expired. What do you think? File src/osmo-bsc/system_information.c: https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/4bc38c72_0183a6f2 PS2, Line 1420: struct gsm_subscriber_connection *conn > should be `const` Done https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/f600693d_fad587ca PS2, Line 1424: *n_bts, *l_bts > cosmetic: better declare these two separately, so they're not hidden behind > the `s_bts` assignment. […] Done https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/cd6e512e_cf268bb5 PS2, Line 1447: 32 > where this limit is coming from? […] Done https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/7352572d_8f0c439c PS2, Line 1459: if (c->lchan->ts->trx->bts->c0->arfcn != arfcn) > can we maybe have a "i_bts = c->lchan->ts->trx->bts;" var here to avoid > dereferencing crazy amounts […] Done -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Icd3101e6dd935a57f003253aaef400c2cf95a0c3 Gerrit-Change-Number: 34626 Gerrit-PatchSet: 3 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-Attention: laforge Gerrit-Attention: fixeria Gerrit-Attention: pespin Gerrit-Comment-Date: Thu, 05 Oct 2023 14:18:54 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge Comment-In-Reply-To: pespin Comment-In-Reply-To: fixeria Gerrit-MessageType: comment
[L] Change in osmo-bsc[master]: ASCI: Add System Information 10 support
Attention is currently required from: jolly, pespin. Hello Jenkins Builder, fixeria, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email to look at the new patch set (#3). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: ASCI: Add System Information 10 support .. ASCI: Add System Information 10 support A timer is used to wait some seconds before sending SI 10 to all BTS. This ensures that all channels are established by the MSC, before sending a complete list of VGCS/VBS neighbor cells for a call. For each BTS, an SI 10 is generated with all other neighbor BTS. The SI 10 will only define neighbor cells within the same BSC, because it does not know about neighbor cells within other BSCs. Change-Id: Icd3101e6dd935a57f003253aaef400c2cf95a0c3 --- M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/system_information.h M src/osmo-bsc/system_information.c M src/osmo-bsc/vgcs_fsm.c 4 files changed, 316 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/26/34626/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Icd3101e6dd935a57f003253aaef400c2cf95a0c3 Gerrit-Change-Number: 34626 Gerrit-PatchSet: 3 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-Attention: jolly Gerrit-Attention: pespin Gerrit-MessageType: newpatchset
[L] Change in osmo-bsc[master]: ASCI: Add System Information 10 support
Attention is currently required from: jolly, pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email ) Change subject: ASCI: Add System Information 10 support .. Patch Set 2: (6 comments) Patchset: PS2: > I also don't like the timer. […] SI10 is actually not needed for the call establishment, it's needed for quicker cell change. Without SI10 a phone participating a group call would need to first tune to BCCH of each neighbor to see if the current group call is also ongoing there or not -- this would cause a gap in the call. IIUC, the payload of SI10 is expected to remain static as long as a) there are no neighbor list changes, b) no ongoing group calls being released, and c) no new group calls being established. Maybe we can trigger SI10 generation and sending if a), b), or c) happens? File src/osmo-bsc/system_information.c: https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/abfe25bf_b72c4afd PS2, Line 1420: struct gsm_subscriber_connection *conn should be `const` https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/b988a2f5_69d6cfbe PS2, Line 1424: *n_bts, *l_bts cosmetic: better declare these two separately, so they're not hidden behind the `s_bts` assignment. Wait, they're only used within the for-loop? Then they should be moved there. https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/7c9d144a_cda5d3da PS2, Line 1428: unsigned int save_cur_bit; : struct gsm_subscriber_connection *c; both vars can be moved to the scope of use (for-loop) https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/7983ba8f_7fe8cfe7 PS2, Line 1447: 32 where this limit is coming from? is there a macro? if not, at least add a comment? https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/668a1787_e10481d1 PS2, Line 1499: /* Do spare padding. We cannot do it earlier, because encoding might corrupt it if differenctial cell info > the same "differential cell info" mentioned a few lines above I guess... Indeed, SI10 employs so-called differential encoding: you encode all the info for the first BTS and then only those parameters that differ for the remaining BTSs. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Icd3101e6dd935a57f003253aaef400c2cf95a0c3 Gerrit-Change-Number: 34626 Gerrit-PatchSet: 2 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-Attention: jolly Gerrit-Attention: pespin Gerrit-Comment-Date: Wed, 04 Oct 2023 19:06:51 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge Comment-In-Reply-To: pespin Gerrit-MessageType: comment
[L] Change in osmo-bsc[master]: ASCI: Add System Information 10 support
Attention is currently required from: fixeria, jolly, pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email ) Change subject: ASCI: Add System Information 10 support .. Patch Set 2: (2 comments) Patchset: PS2: > This timer to trigger the SI looks a bit hackish, but I don't know/understand > the details here, so l […] I also don't like the timer. Who says that 3s is sufficient to establish all the calls? What if there's a slow (e.g. VSAT) link in between with very high RTT? The question is what kind of other alternative do we have? And: How hurtful is it if the timer expires before the MSC has established all of those calls? File src/osmo-bsc/system_information.c: https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/242086f7_3354ebb9 PS2, Line 1499: /* Do spare padding. We cannot do it earlier, because encoding might corrupt it if differenctial cell info > differenctial? what do you mean? the same "differential cell info" mentioned a few lines above I guess... -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Icd3101e6dd935a57f003253aaef400c2cf95a0c3 Gerrit-Change-Number: 34626 Gerrit-PatchSet: 2 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-Attention: jolly Gerrit-Attention: pespin Gerrit-Attention: fixeria Gerrit-Comment-Date: Wed, 04 Oct 2023 12:34:45 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment
[L] Change in osmo-bsc[master]: ASCI: Add System Information 10 support
Attention is currently required from: fixeria, jolly, laforge. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email ) Change subject: ASCI: Add System Information 10 support .. Patch Set 2: (4 comments) Commit Message: https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/e2b372f0_d9e9ada0 PS2, Line 13: For each BTS, an SI 10 is gerated with all other neighbor BTS. generated Patchset: PS2: This timer to trigger the SI looks a bit hackish, but I don't know/understand the details here, so letting others provide feedback. File src/osmo-bsc/system_information.c: https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/b6b504b7_fdbabeb6 PS2, Line 1459: if (c->lchan->ts->trx->bts->c0->arfcn != arfcn) can we maybe have a "i_bts = c->lchan->ts->trx->bts;" var here to avoid dereferencing crazy amounts of pointers twice? Also easier to read. https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/dc130a4f_99adb46a PS2, Line 1499: /* Do spare padding. We cannot do it earlier, because encoding might corrupt it if differenctial cell info differenctial? what do you mean? -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Icd3101e6dd935a57f003253aaef400c2cf95a0c3 Gerrit-Change-Number: 34626 Gerrit-PatchSet: 2 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-Attention: jolly Gerrit-Attention: laforge Gerrit-Attention: fixeria Gerrit-Comment-Date: Wed, 04 Oct 2023 11:40:23 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
[L] Change in osmo-bsc[master]: ASCI: Add System Information 10 support
Attention is currently required from: jolly. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: ASCI: Add System Information 10 support .. ASCI: Add System Information 10 support A timer is used to wait some seconds before sending SI 10 to all BTS. This ensures that all channels are established by the MSC, before sending a complete list of VGCS/VBS neighbor cells for a call. For each BTS, an SI 10 is gerated with all other neighbor BTS. The SI 10 will only define neighbor cells within the same BSC, because it does not know about neighbor cells within other BSCs. Change-Id: Icd3101e6dd935a57f003253aaef400c2cf95a0c3 --- M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/system_information.h M src/osmo-bsc/system_information.c M src/osmo-bsc/vgcs_fsm.c 4 files changed, 313 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/26/34626/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Icd3101e6dd935a57f003253aaef400c2cf95a0c3 Gerrit-Change-Number: 34626 Gerrit-PatchSet: 2 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: jolly Gerrit-MessageType: newpatchset
[L] Change in osmo-bsc[master]: ASCI: Add System Information 10 support
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email ) Change subject: ASCI: Add System Information 10 support .. Patch Set 1: (8 comments) File src/osmo-bsc/system_information.c: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-11614): https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/7fbe1416_422ea8dc PS1, Line 1422: struct gsm48_system_information_type_10 *si10 = (struct gsm48_system_information_type_10*)data; "(foo*)" should be "(foo *)" Robot Comment from checkpatch (run ID jenkins-gerrit-lint-11614): https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/1018d1fc_937af272 PS1, Line 1433: .data_len = len - sizeof(*si10), code indent should use tabs where possible Robot Comment from checkpatch (run ID jenkins-gerrit-lint-11614): https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/ed90faab_503ef7a3 PS1, Line 1433: .data_len = len - sizeof(*si10), please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-11614): https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/a7d9392d_9cc2ef23 PS1, Line 1434: .data = si10->rest_octets, code indent should use tabs where possible Robot Comment from checkpatch (run ID jenkins-gerrit-lint-11614): https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/ec327412_c7944527 PS1, Line 1434: .data = si10->rest_octets, please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-11614): https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/5dba1358_7a767b41 PS1, Line 1435: }; code indent should use tabs where possible Robot Comment from checkpatch (run ID jenkins-gerrit-lint-11614): https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/b5286d70_b5d00035 PS1, Line 1435: }; please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-11614): https://gerrit.osmocom.org/c/osmo-bsc/+/34626/comment/b03672ea_d1d12624 PS1, Line 1441: /* If we have gernerated SI5 with seperate SI5 list, the used frequency indexes refer to it. */ 'seperate' may be misspelled - perhaps 'separate'? -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Icd3101e6dd935a57f003253aaef400c2cf95a0c3 Gerrit-Change-Number: 34626 Gerrit-PatchSet: 1 Gerrit-Owner: jolly Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Tue, 03 Oct 2023 20:06:40 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
[L] Change in osmo-bsc[master]: ASCI: Add System Information 10 support
jolly has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/34626?usp=email ) Change subject: ASCI: Add System Information 10 support .. ASCI: Add System Information 10 support A timer is used to wait some seconds before sending SI 10 to all BTS. This ensures that all channels are established by the MSC, before sending a complete list of VGCS/VBS neighbor cells for a call. For each BTS, an SI 10 is gerated with all other neighbor BTS. The SI 10 will only define neighbor cells within the same BSC, because it does not know about neighbor cells within other BSCs. Change-Id: Icd3101e6dd935a57f003253aaef400c2cf95a0c3 --- M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/system_information.h M src/osmo-bsc/system_information.c M src/osmo-bsc/vgcs_fsm.c 4 files changed, 313 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/26/34626/1 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 275e4f1..7c6df9f 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -436,6 +436,8 @@ bool msc_ack; /* List of VGCS/VBS "resource controling" connections */ struct llist_head chan_list; + /* Timer to send SI 10 */ + struct osmo_timer_list si10_timer; } vgcs_call; /* VGCS/VBS "resource controling" connection */ diff --git a/include/osmocom/bsc/system_information.h b/include/osmocom/bsc/system_information.h index f74ef6d..f8f79a4 100644 --- a/include/osmocom/bsc/system_information.h +++ b/include/osmocom/bsc/system_information.h @@ -11,6 +11,7 @@ int generate_cell_chan_alloc(struct gsm_bts *bts); int generate_cell_chan_list(uint8_t *chan_list, struct gsm_bts *bts); int gsm_generate_si(struct gsm_bts *bts, enum osmo_sysinfo_type type); +int gsm_generate_si10(uint8_t *data, size_t len, struct gsm_subscriber_connection *conn); size_t si2q_earfcn_count(const struct osmo_earfcn_si2q *e); unsigned range1024_p(unsigned n); unsigned range512_q(unsigned m); diff --git a/src/osmo-bsc/system_information.c b/src/osmo-bsc/system_information.c index 94205aa..f03b95b 100644 --- a/src/osmo-bsc/system_information.c +++ b/src/osmo-bsc/system_information.c @@ -1246,6 +1246,265 @@ return l2_plen + rc; } +static int si10_rest_octets_encode(struct gsm_bts *s_bts, struct bitvec *bv, struct gsm_bts *n_bts, uint8_t index) +{ + /* The BA-IND must be equal to the BA-IND in SI5*. */ + /* */ + bitvec_set_bit(bv, 1); + + /* Do we have neighbor cells ? */ + /* { L | H } */ + if (!n_bts) + return 0; + bitvec_set_bit(bv, H); + + /* */ + bitvec_set_uint(bv, index, 5); + + /* */ + bitvec_set_uint(bv, n_bts->bsic, 6); + + /* We do not provide empty cell information. */ + /* { H | L } */ + bitvec_set_bit(bv, H); + + /* If cell is barred, we do not need further cell info. */ + /* | L */ + if (n_bts->si_common.rach_control.cell_bar) { + /* H */ + bitvec_set_bit(bv, H); + /* We are done with the first cell info. */ + return 0; + } + bitvec_set_bit(bv, L); + + /* If LA is different for serving cell, we need to add CRH. */ + /* { H | L } */ + if (s_bts->location_area_code != n_bts->location_area_code) { + bitvec_set_bit(bv, H); + bitvec_set_uint(bv, n_bts->si_common.cell_sel_par.cell_resel_hyst, 3); + } else + bitvec_set_bit(bv, L); + + /* */ + bitvec_set_uint(bv, n_bts->si_common.cell_sel_par.ms_txpwr_max_ccch, 5); + + /* */ + bitvec_set_uint(bv, n_bts->si_common.cell_sel_par.rxlev_acc_min, 6); + + /* */ + if (n_bts->si_common.cell_ro_sel_par.present) + bitvec_set_uint(bv, n_bts->si_common.cell_ro_sel_par.cell_resel_off, 6); + else + bitvec_set_uint(bv, 0, 6); + + /* */ + if (n_bts->si_common.cell_ro_sel_par.present) + bitvec_set_uint(bv, n_bts->si_common.cell_ro_sel_par.temp_offs, 3); + else + bitvec_set_uint(bv, 0, 3); + + /* */ + if (n_bts->si_common.cell_ro_sel_par.present) + bitvec_set_uint(bv, n_bts->si_common.cell_ro_sel_par.penalty_time, 5); + else + bitvec_set_uint(bv, 0, 5); + + /* We are done with the first cell info. */ + return 0; +} + +static int si10_rest_octets_encode_other(struct gsm_bts *s_bts, struct bitvec *bv, struct gsm_bts *l_bts, +struct gsm_bts *n_bts, uint8_t last_index, uint8_t index) +{ + int rc; + + /* If the bv buffer would overflow, then the bits are not written. Each bitvec_set_* call will return +* an error code. This