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

October 2023

  • 1 participants
  • 1843 discussions
[M] Change in osmo-ttcn3-hacks[master]: DIAMETER_Types: Generate fields from RFC 5447
by osmith 24 Oct '23

24 Oct '23
Attention is currently required from: pespin. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34873?usp=email ) Change subject: DIAMETER_Types: Generate fields from RFC 5447 ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34873?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I478eff657d876d4ec9a5a1906cab48fbaaaae1b9 Gerrit-Change-Number: 34873 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 24 Oct 2023 09:01:41 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[L] Change in osmo-ttcn3-hacks[master]: library/DIAMETER: Split TS 29.273 templates into its own file
by osmith 24 Oct '23

24 Oct '23
Attention is currently required from: pespin. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34872?usp=email ) Change subject: library/DIAMETER: Split TS 29.273 templates into its own file ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34872?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I77f917404dd70559b2b2cc62199ed70289ab0825 Gerrit-Change-Number: 34872 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 24 Oct 2023 09:00:38 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: epdg: Emulate PGW tx AAR and rx AAA in S6b interface
by osmith 24 Oct '23

24 Oct '23
Attention is currently required from: lynxis lazus, pespin. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34861?usp=email ) Change subject: epdg: Emulate PGW tx AAR and rx AAA in S6b interface ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34861?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ia50698a3f6f5ed8251486b84c09f84edfd6d3951 Gerrit-Change-Number: 34861 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Comment-Date: Tue, 24 Oct 2023 09:00:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: DIAMETER_Templates: Add S6b AAR and AAA message templates
by osmith 24 Oct '23

24 Oct '23
Attention is currently required from: lynxis lazus, pespin. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34860?usp=email ) Change subject: DIAMETER_Templates: Add S6b AAR and AAA message templates ...................................................................... Patch Set 2: Code-Review+1 (1 comment) File library/DIAMETER_Templates.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34860/comment/0f187277_a5b5… PS2, Line 1532: private function f_tr_AVP_AuthRequestType(template (present) BASE_NONE_Auth_Request_Type auth_req_type) why is this commented out? -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34860?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I302d9a94e6ffbb62b6db81e1b14484355e55ebe5 Gerrit-Change-Number: 34860 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Comment-Date: Tue, 24 Oct 2023 08:59:10 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmocore[master]: Disable uring when building for embedded
by daniel 24 Oct '23

24 Oct '23
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/34879?usp=email ) Change subject: Disable uring when building for embedded ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: Unfortunately this doesn't fix the issue of pkg-config running for uring (it also runs for e.g. pcsclite) when passing --enable-embedded -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34879?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iec2503986c6d3487761ba592daef0fd42478aa7d Gerrit-Change-Number: 34879 Gerrit-PatchSet: 1 Gerrit-Owner: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 24 Oct 2023 08:54:50 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[M] Change in libosmocore[master]: gsmtap_util: Use Osmo IO instead of Osmo write queues
by daniel 24 Oct '23

24 Oct '23
Attention is currently required from: arehbein, laforge, pespin. daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/34743?usp=email ) Change subject: gsmtap_util: Use Osmo IO instead of Osmo write queues ...................................................................... Patch Set 6: (1 comment) File src/core/gsmtap_util.c: https://gerrit.osmocom.org/c/libosmocore/+/34743/comment/60b927bc_93d7e161 PS5, Line 478: osmo_iofd_setup(gti, gti->sink_fd, "gsmtap_inst.out", OSMO_IO_FD_MODE_READ_WRITE, &gsmtap_sink_ops, NULL); > simply never read from that fd and just keep it open there so no ICMP errors are sent Yeah, one option is to keep it like it was not using osmo_io (so that the read doesn't allocate). I was wondering what happens if you open the socket and simply never read from it since we don't care about the data anyway. I don't think it's worth the effort here because we might need to decrease the kernel receive buffer and even then the kernel could send ICMP errors. So I'd suggest to keep the source_add_sink code as it was before (using osmo_fd with the read callback). -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34743?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iadbbef74e3add7001d84dd6b68f51eac293e44d0 Gerrit-Change-Number: 34743 Gerrit-PatchSet: 6 Gerrit-Owner: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: arehbein <arehbein(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 24 Oct 2023 08:50:22 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: arehbein <arehbein(a)sysmocom.de> Comment-In-Reply-To: daniel <dwillmann(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[M] Change in libosmocore[master]: gsmtap_util: Use Osmo IO instead of Osmo write queues
by arehbein 24 Oct '23

24 Oct '23
Attention is currently required from: daniel, laforge, pespin. arehbein has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/34743?usp=email ) Change subject: gsmtap_util: Use Osmo IO instead of Osmo write queues ...................................................................... Patch Set 6: (1 comment) Patchset: PS1: > So, I took a short look again and it appears to be the `#if (!EMBEDDED)` in `include/osmocom/core/so […] (solved via patch update here instead) -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34743?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iadbbef74e3add7001d84dd6b68f51eac293e44d0 Gerrit-Change-Number: 34743 Gerrit-PatchSet: 6 Gerrit-Owner: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Comment-Date: Tue, 24 Oct 2023 08:37:05 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: arehbein <arehbein(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmocore[master]: Disable uring when building for embedded
by pespin 24 Oct '23

24 Oct '23
Attention is currently required from: daniel. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/34879?usp=email ) Change subject: Disable uring when building for embedded ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34879?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iec2503986c6d3487761ba592daef0fd42478aa7d Gerrit-Change-Number: 34879 Gerrit-PatchSet: 1 Gerrit-Owner: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Comment-Date: Tue, 24 Oct 2023 08:18:22 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmocore[master]: Disable uring when building for embedded
by daniel 24 Oct '23

24 Oct '23
daniel has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/34879?usp=email ) Change subject: Disable uring when building for embedded ...................................................................... Disable uring when building for embedded Change-Id: Iec2503986c6d3487761ba592daef0fd42478aa7d Related: OS#6233 --- M configure.ac 1 file changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/79/34879/1 diff --git a/configure.ac b/configure.ac index 2fc9895..29a9570 100644 --- a/configure.ac +++ b/configure.ac @@ -403,6 +403,7 @@ AM_CONDITIONAL(ENABLE_LIBSCTP, false) AM_CONDITIONAL(ENABLE_LIBUSB, false) AM_CONDITIONAL(ENABLE_PCSC, false) + AM_CONDITIONAL(ENABLE_URING, false) AM_CONDITIONAL(ENABLE_PSEUDOTALLOC, true) AM_CONDITIONAL(ENABLE_SERCOM_STUB, true) AM_CONDITIONAL(EMBEDDED, true) -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34879?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iec2503986c6d3487761ba592daef0fd42478aa7d Gerrit-Change-Number: 34879 Gerrit-PatchSet: 1 Gerrit-Owner: daniel <dwillmann(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[L] Change in osmo-bsc[master]: ASCI: Add System Information 10 support
by jolly 24 Oct '23

24 Oct '23
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 <osmocom/gsm/gsm48_arfcn_range_encode.h> +/* Complete length of SYSTEM INFORMATION 10 (SACCH) */ +#define SI10_LENGTH 21 + 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*. */ + /* <BA ind : bit(1)> */ + bitvec_set_bit(bv, 1); + + /* Do we have neighbor cells ? */ + /* { L <spare padding> | H <neighbour information> } */ + if (!n_bts) + return 0; + bitvec_set_bit(bv, H); + + /* <first frequency: bit(5)> */ + bitvec_set_uint(bv, index, 5); + + /* <bsic : bit(6)> */ + bitvec_set_uint(bv, n_bts->bsic, 6); + + /* We do not provide empty cell information. */ + /* { H <cell parameters> | L } */ + bitvec_set_bit(bv, H); + + /* If cell is barred, we do not need further cell info. */ + /* <cell barred> | L <further cell info> */ + 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 <cell reselect hysteresis : bit(3)> | 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); + + /* <ms txpwr max cch : bit(5)> */ + bitvec_set_uint(bv, n_bts->si_common.cell_sel_par.ms_txpwr_max_ccch, 5); + + /* <rxlev access min : bit(6)> */ + bitvec_set_uint(bv, n_bts->si_common.cell_sel_par.rxlev_acc_min, 6); + + /* <cell reselect offset : bit(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); + + /* <temporary offset : bit(3)> */ + 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); + + /* <penalty time : bit(5)> */ + 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 <info field> } */ + bitvec_set_bit(bv, H); + + /* How many frequency indices do we skip? */ + /* <next frequency>** L <differential cell info> */ + while ((last_index = (last_index + 1) & 0x1f) != index) { + /* H */ + bitvec_set_bit(bv, H); + } + bitvec_set_bit(bv, L); + + /* If NCC is equal, just send BCC, otherwise send complete BSIC. */ + /* { H <BCC : bit(3)> | L <bsic : bit(6)> } */ + if ((l_bts->bsic & 0x38) == (n_bts->bsic & 0x38)) + bitvec_set_uint(bv, n_bts->bsic & 0x07, 3); + else + bitvec_set_uint(bv, n_bts->bsic, 6); + + /* We do not provide empty cell information. */ + /* { H <cell parameters> | L } */ + bitvec_set_bit(bv, H); + + /* If cell is barred, we do not need further cell info. */ + /* <cell barred> | L <further cell info> */ + if (n_bts->si_common.rach_control.cell_bar) { + /* H */ + rc = bitvec_set_bit(bv, H); + /* We are done with the other cell info. */ + return rc; + } + bitvec_set_bit(bv, L); + + /* If LA is different for serving cell, we need to add CRH. */ + /* { H <cell reselect hysteresis : bit(3)> | 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); + + /* { H <ms txpwr max cch : bit(5)> | L } */ + if (l_bts->si_common.cell_sel_par.ms_txpwr_max_ccch != n_bts->si_common.cell_sel_par.ms_txpwr_max_ccch) { + bitvec_set_bit(bv, H); + bitvec_set_uint(bv, n_bts->si_common.cell_sel_par.ms_txpwr_max_ccch, 5); + } else + bitvec_set_bit(bv, L); + + /* { H <rxlev access min : bit(6)> | L } */ + if (l_bts->si_common.cell_sel_par.rxlev_acc_min != n_bts->si_common.cell_sel_par.rxlev_acc_min) { + bitvec_set_bit(bv, H); + bitvec_set_uint(bv, n_bts->si_common.cell_sel_par.rxlev_acc_min, 6); + } else + bitvec_set_bit(bv, L); + + /* { H <cell reselect offset : bit(6)> | L } */ + if (l_bts->si_common.cell_ro_sel_par.present != n_bts->si_common.cell_ro_sel_par.present || + (n_bts->si_common.cell_ro_sel_par.present && + l_bts->si_common.cell_ro_sel_par.cell_resel_off != n_bts->si_common.cell_ro_sel_par.cell_resel_off)) { + bitvec_set_bit(bv, H); + 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); + } else + bitvec_set_bit(bv, L); + + /* { H <temporary offset : bit(3)> | L } */ + if (l_bts->si_common.cell_ro_sel_par.present != n_bts->si_common.cell_ro_sel_par.present || + (n_bts->si_common.cell_ro_sel_par.present && + l_bts->si_common.cell_ro_sel_par.temp_offs != n_bts->si_common.cell_ro_sel_par.temp_offs)) { + bitvec_set_bit(bv, H); + 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); + } else + bitvec_set_bit(bv, L); + + /* { H <penalty time : bit(5)> | L } */ + if (l_bts->si_common.cell_ro_sel_par.present != n_bts->si_common.cell_ro_sel_par.present || + (n_bts->si_common.cell_ro_sel_par.present && + l_bts->si_common.cell_ro_sel_par.penalty_time != n_bts->si_common.cell_ro_sel_par.penalty_time)) { + bitvec_set_bit(bv, H); + if (n_bts->si_common.cell_ro_sel_par.present) + rc = bitvec_set_uint(bv, n_bts->si_common.cell_ro_sel_par.penalty_time, 5); + else + rc = bitvec_set_uint(bv, 0, 5); + } else + rc = bitvec_set_bit(bv, L); + + /* We are done with the other cell info. */ + return rc; +} + +/* Generate SI 10 and return the number of bits used in the rest octet. */ +int gsm_generate_si10(struct gsm48_system_information_type_10 *si10, size_t len, + const struct gsm_subscriber_connection *conn) +{ + struct bitvec *nbv; + struct gsm_bts *s_bts = conn->lchan->ts->trx->bts; + int i; + bool any_neighbor = false; + int rc; + + struct bitvec bv = { + .data_len = len - sizeof(*si10), + .data = si10->rest_octets, + }; + + si10->rr_short_pd = 0; /* 3GPP TS 24.007 §11.3.2.1 */ + si10->msg_type = GSM48_MT_RR_SH_SI10; + si10->l2_header = 0; /* 3GPP TS 44.006 §6.4a */ + + /* If we have gernerated SI5 with separate SI5 list, the used frequency indexes refer to it. */ + if (s_bts->neigh_list_manual_mode == NL_MODE_MANUAL_SI5SEP) + nbv = &s_bts->si_common.si5_neigh_list; + else + nbv = &s_bts->si_common.neigh_list; + + /* Get up to 32 possible neighbor frequencies that SI10 can refer to. */ + for (i = 0; i < 32; i++) { + struct gsm_bts *c_bts, *n_bts, *l_bts; + struct gsm_subscriber_connection *c; + unsigned int save_cur_bit; + int16_t arfcn; + int last_i; + arfcn = neigh_list_get_arfcn(s_bts, nbv, i); + /* End of list */ + if (arfcn < 0) + break; + /* Is this neighbour used for this group call? */ + n_bts = NULL; + llist_for_each_entry(c, &conn->vgcs_chan.call->vgcs_call.chan_list, vgcs_chan.list) { + if (c == conn) + continue; + if (!c->lchan) + continue; + c_bts = c->lchan->ts->trx->bts; + if (c_bts->c0->arfcn != arfcn) + continue; + n_bts = c_bts; + break; + } + if (n_bts) { + if (!any_neighbor) { + /* First neighbor, so generate rest octets with first cell info. */ + LOGP(DRR, LOGL_INFO, "SI 10 with cell ID %d.\n", n_bts->cell_identity); + rc = si10_rest_octets_encode(s_bts, &bv, n_bts, i); + if (rc < 0) + return rc; + any_neighbor = true; + } else { + /* Save current position, so we can restore to last position in case of failure. */ + save_cur_bit = bv.cur_bit; + /* Nth neighbor, so add rest octets with differential cell info. */ + LOGP(DRR, LOGL_INFO, "Append cell ID %d to SI 10.\n", n_bts->cell_identity); + rc = si10_rest_octets_encode_other(s_bts, &bv, l_bts, n_bts, last_i, i); + if (rc < 0) { + LOGP(DRR, LOGL_INFO, "Skip cell ID %d, SI 10 would overflow.\n", + n_bts->cell_identity); + /* Resore last position. */ + bv.cur_bit = save_cur_bit; + break; + } + } + last_i = i; + l_bts = n_bts; + } + } + + /* If no neighbor exists, generate rest octets without any neighbor info. */ + if (!any_neighbor) { + LOGP(DRR, LOGL_INFO, "SI 10 without any neighbor cell.\n"); + rc = si10_rest_octets_encode(s_bts, &bv, NULL, 0); + if (rc < 0) + return rc; + } + + /* Do spare padding. We cannot do it earlier, because encoding might corrupt it if differential cell info + * does not fit into the message. */ + while ((bv.cur_bit & 7)) + bitvec_set_bit(&bv, L); + memset(bv.data + bv.cur_bit / 8, GSM_MACBLOCK_PADDING, bv.data_len - bv.cur_bit / 8); + + return len; +} + static int generate_si13(enum osmo_sysinfo_type t, struct gsm_bts *bts) { struct gsm48_system_information_type_13 *si13 = diff --git a/src/osmo-bsc/vgcs_fsm.c b/src/osmo-bsc/vgcs_fsm.c index 8969d4f..22f955a 100644 --- a/src/osmo-bsc/vgcs_fsm.c +++ b/src/osmo-bsc/vgcs_fsm.c @@ -53,6 +53,7 @@ #include <osmocom/bsc/gsm_04_08_rr.h> #include <osmocom/bsc/bts_trx.h> #include <osmocom/bsc/bts.h> +#include <osmocom/bsc/system_information.h> #define S(x) (1 << (x)) @@ -129,6 +130,38 @@ * VGCS call FSM */ +/* Add/update SI10. It must be called whenever a channel is activated or failed. */ +static void si10_update(struct gsm_subscriber_connection *conn) +{ + struct gsm_subscriber_connection *c; + uint8_t si10[SI10_LENGTH]; + int rc; + + /* Skip SI10 update, if not all channels have been activated or failed. */ + llist_for_each_entry(c, &conn->vgcs_call.chan_list, vgcs_chan.list) { + if (c->vgcs_chan.fi->state == VGCS_CHAN_ST_WAIT_EST) { + LOG_CALL(conn, LOGL_DEBUG, "There is a channel, not yet active. No SI10 update now.\n"); + return; + } + } + + LOG_CALL(conn, LOGL_DEBUG, "New channel(s) added, updating SI10 for all channels.\n"); + + /* Go through all channels. */ + llist_for_each_entry(c, &conn->vgcs_call.chan_list, vgcs_chan.list) { + /* Skip all channels that failed to activate or have not been aktivated yet. + * There shouldn't be any channel in that state now. */ + if (!c->lchan) + continue; + /* Encode SI 10 for this channel. Skip, if it fails. */ + rc = gsm_generate_si10((struct gsm48_system_information_type_10 *)si10, sizeof(si10), c); + if (rc < 0) + continue; + /* Add SI 10 to SACCH of this channel c. */ + rsl_sacch_info_modify(c->lchan, RSL_SYSTEM_INFO_10, si10, sizeof(si10)); + } +} + static void vgcs_call_detach_and_destroy(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause) { struct gsm_subscriber_connection *conn = fi->priv, *c; @@ -667,6 +700,9 @@ LOG_CHAN(conn, LOGL_DEBUG, "lchan failed.\n"); /* BTS reports failure on channel request. */ osmo_fsm_inst_state_chg(fi, VGCS_CHAN_ST_NULL, 0, 0); + /* Add/update SI10. */ + if (conn->vgcs_chan.call) + si10_update(conn->vgcs_chan.call); /* Report failure to MSC. */ bsc_tx_vgcs_vbs_assignment_fail(conn, GSM0808_CAUSE_EQUIPMENT_FAILURE); break; @@ -691,9 +727,12 @@ osmo_fsm_inst_state_chg(fi, VGCS_CHAN_ST_ACTIVE_FREE, 0, 0); else osmo_fsm_inst_state_chg(fi, VGCS_CHAN_ST_ACTIVE_BLOCKED, 0, 0); - /* Add call to notification channel. */ - if (conn->vgcs_chan.call) + if (conn->vgcs_chan.call) { + /* Add call to notification channel. */ rsl_notification_cmd(conn->lchan->ts->trx->bts, conn->lchan, &conn->vgcs_chan.gc_ie, NULL); + /* Add/update SI10. */ + si10_update(conn->vgcs_chan.call); + } /* Report result to MSC. */ bsc_tx_vgcs_vbs_assignment_result(conn, &conn->vgcs_chan.ct, &conn->vgcs_chan.ci, conn->vgcs_chan.call_id); @@ -702,6 +741,9 @@ LOG_CHAN(conn, LOGL_DEBUG, "MGW endpoint failed.\n"); /* MGW reports failure. */ osmo_fsm_inst_state_chg(fi, VGCS_CHAN_ST_NULL, 0, 0); + /* Add/update SI10. */ + if (conn->vgcs_chan.call) + si10_update(conn->vgcs_chan.call); /* Report failure to MSC. */ bsc_tx_vgcs_vbs_assignment_fail(conn, GSM0808_CAUSE_EQUIPMENT_FAILURE); break; -- 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 <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • ...
  • 185
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.