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

November 2022

  • 2 participants
  • 2503 discussions
Change in osmo-bsc[master]: Cosmetic: fix spaces around timers
by pespin 22 Nov '22

22 Nov '22
Attention is currently required from: osmith. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/30270 ) Change subject: Cosmetic: fix spaces around timers ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/30270 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I01ce986a1b0cdd74d945a04ae62a07f2850d366f Gerrit-Change-Number: 30270 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Tue, 22 Nov 2022 16:55:02 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bsc[master]: lchan_fsm: fix lchan_fsm_on_error size
by pespin 22 Nov '22

22 Nov '22
Attention is currently required from: osmith. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/30269 ) Change subject: lchan_fsm: fix lchan_fsm_on_error size ...................................................................... Patch Set 1: Code-Review+1 (1 comment) File src/osmo-bsc/lchan_fsm.c: https://gerrit.osmocom.org/c/osmo-bsc/+/30269/comment/d9316cce_20142ac9 PS1, Line 328: [LCHAN_ST_UNUSED] = LCHAN_ST_UNUSED, we should really add define in libosmocore for this. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/30269 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I62f5e0f380513c52ea6932b270cf0c852930eb9f Gerrit-Change-Number: 30269 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Tue, 22 Nov 2022 16:53:53 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bsc[master]: Cosmetic: lchan_fsm: drop obsolete comment
by pespin 22 Nov '22

22 Nov '22
Attention is currently required from: osmith, neels. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/30268 ) Change subject: Cosmetic: lchan_fsm: drop obsolete comment ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/30268 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I2ce4d691715c1ea5c7c7896693a03b0aefbdb5b9 Gerrit-Change-Number: 30268 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Comment-Date: Tue, 22 Nov 2022 16:52:50 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-ci[master]: obs/srcpkg: open5gs: download all subprojects
by fixeria 22 Nov '22

22 Nov '22
Attention is currently required from: osmith, pespin, daniel. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/30263 ) Change subject: obs/srcpkg: open5gs: download all subprojects ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/30263 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: If3910b520382b177a77b216c93771ea88414723d Gerrit-Change-Number: 30263 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Comment-Date: Tue, 22 Nov 2022 16:49:26 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bsc[master]: lchan_fsm: fix lchan_fsm_on_error size
by osmith 22 Nov '22

22 Nov '22
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/30269 ) Change subject: lchan_fsm: fix lchan_fsm_on_error size ...................................................................... lchan_fsm: fix lchan_fsm_on_error size Set it to 32, because osmo_fsm allows 32 states. Change-Id: I62f5e0f380513c52ea6932b270cf0c852930eb9f --- M src/osmo-bsc/lchan_fsm.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/69/30269/1 diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c index 2931f8f..21b38d2 100644 --- a/src/osmo-bsc/lchan_fsm.c +++ b/src/osmo-bsc/lchan_fsm.c @@ -324,7 +324,7 @@ } while (0) /* Which state to transition to when lchan_fail() is called in a given state. */ -uint32_t lchan_fsm_on_error[34] = { +uint32_t lchan_fsm_on_error[32] = { [LCHAN_ST_UNUSED] = LCHAN_ST_UNUSED, [LCHAN_ST_WAIT_TS_READY] = LCHAN_ST_UNUSED, [LCHAN_ST_WAIT_ACTIV_ACK] = LCHAN_ST_BORKEN, -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/30269 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I62f5e0f380513c52ea6932b270cf0c852930eb9f Gerrit-Change-Number: 30269 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-bsc[master]: Cosmetic: fix spaces around timers
by osmith 22 Nov '22

22 Nov '22
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/30270 ) Change subject: Cosmetic: fix spaces around timers ...................................................................... Cosmetic: fix spaces around timers Use spaces around equals signs inside structs, as expected from the kernel coding style we mostly follow. Neels wrote: > IIUC "T=123" without spaces is my personal favorite that goes against > the accepted linter standard, i guess rather than everyone else > adapting to my weird style, i should start adding spaces in my > patches. Change-Id: I01ce986a1b0cdd74d945a04ae62a07f2850d366f --- M src/osmo-bsc/assignment_fsm.c M src/osmo-bsc/lchan_fsm.c M src/osmo-bsc/lchan_rtp_fsm.c M src/osmo-bsc/net_init.c M tests/nanobts_omlattr/nanobts_omlattr_test.c 5 files changed, 54 insertions(+), 54 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/70/30270/1 diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c index fff7e59..f00b26d 100644 --- a/src/osmo-bsc/assignment_fsm.c +++ b/src/osmo-bsc/assignment_fsm.c @@ -51,10 +51,10 @@ } static const struct osmo_tdef_state_timeout assignment_fsm_timeouts[32] = { - [ASSIGNMENT_ST_WAIT_LCHAN_ACTIVE] = { .T=10 }, - [ASSIGNMENT_ST_WAIT_RR_ASS_COMPLETE] = { .keep_timer=true }, - [ASSIGNMENT_ST_WAIT_LCHAN_ESTABLISHED] = { .keep_timer=true }, - [ASSIGNMENT_ST_WAIT_MGW_ENDPOINT_TO_MSC] = { .T=23042 }, + [ASSIGNMENT_ST_WAIT_LCHAN_ACTIVE] = { .T = 10 }, + [ASSIGNMENT_ST_WAIT_RR_ASS_COMPLETE] = { .keep_timer = true }, + [ASSIGNMENT_ST_WAIT_LCHAN_ESTABLISHED] = { .keep_timer = true }, + [ASSIGNMENT_ST_WAIT_MGW_ENDPOINT_TO_MSC] = { .T = 23042 }, }; /* Transition to a state, using the T timer defined in assignment_fsm_timeouts. diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c index 21b38d2..ab3fbdd 100644 --- a/src/osmo-bsc/lchan_fsm.c +++ b/src/osmo-bsc/lchan_fsm.c @@ -282,15 +282,15 @@ } struct osmo_tdef_state_timeout lchan_fsm_timeouts[32] = { - [LCHAN_ST_WAIT_TS_READY] = { .T=-5 }, - [LCHAN_ST_WAIT_ACTIV_ACK] = { .T=-6 }, - [LCHAN_ST_WAIT_RLL_RTP_ESTABLISH] = { .T=3101 }, - [LCHAN_ST_WAIT_RLL_RTP_RELEASED] = { .T=3109 }, - [LCHAN_ST_WAIT_BEFORE_RF_RELEASE] = { .T=3111 }, - [LCHAN_ST_WAIT_RF_RELEASE_ACK] = { .T=3111 }, - [LCHAN_ST_WAIT_AFTER_ERROR] = { .T=-3111 }, - [LCHAN_ST_WAIT_RR_CHAN_MODE_MODIFY_ACK] = { .T=-13 }, - [LCHAN_ST_WAIT_RSL_CHAN_MODE_MODIFY_ACK] = { .T=-14 }, + [LCHAN_ST_WAIT_TS_READY] = { .T = -5 }, + [LCHAN_ST_WAIT_ACTIV_ACK] = { .T = -6 }, + [LCHAN_ST_WAIT_RLL_RTP_ESTABLISH] = { .T = 3101 }, + [LCHAN_ST_WAIT_RLL_RTP_RELEASED] = { .T = 3109 }, + [LCHAN_ST_WAIT_BEFORE_RF_RELEASE] = { .T = 3111 }, + [LCHAN_ST_WAIT_RF_RELEASE_ACK] = { .T = 3111 }, + [LCHAN_ST_WAIT_AFTER_ERROR] = { .T = -3111 }, + [LCHAN_ST_WAIT_RR_CHAN_MODE_MODIFY_ACK] = { .T = -13 }, + [LCHAN_ST_WAIT_RSL_CHAN_MODE_MODIFY_ACK] = { .T = -14 }, }; /* Transition to a state, using the T timer defined in lchan_fsm_timeouts. diff --git a/src/osmo-bsc/lchan_rtp_fsm.c b/src/osmo-bsc/lchan_rtp_fsm.c index 0791619..8b61f1e 100644 --- a/src/osmo-bsc/lchan_rtp_fsm.c +++ b/src/osmo-bsc/lchan_rtp_fsm.c @@ -44,10 +44,10 @@ } struct osmo_tdef_state_timeout lchan_rtp_fsm_timeouts[32] = { - [LCHAN_RTP_ST_WAIT_MGW_ENDPOINT_AVAILABLE] = { .T=-9 }, - [LCHAN_RTP_ST_WAIT_IPACC_CRCX_ACK] = { .T=-7 }, - [LCHAN_RTP_ST_WAIT_IPACC_MDCX_ACK] = { .T=-8 }, - [LCHAN_RTP_ST_WAIT_MGW_ENDPOINT_CONFIGURED] = { .T=-10 }, + [LCHAN_RTP_ST_WAIT_MGW_ENDPOINT_AVAILABLE] = { .T = -9 }, + [LCHAN_RTP_ST_WAIT_IPACC_CRCX_ACK] = { .T = -7 }, + [LCHAN_RTP_ST_WAIT_IPACC_MDCX_ACK] = { .T = -8 }, + [LCHAN_RTP_ST_WAIT_MGW_ENDPOINT_CONFIGURED] = { .T = -10 }, }; /* Transition to a state, using the T timer defined in lchan_rtp_fsm_timeouts. diff --git a/src/osmo-bsc/net_init.c b/src/osmo-bsc/net_init.c index 8f2b26c..ad2f9bf 100644 --- a/src/osmo-bsc/net_init.c +++ b/src/osmo-bsc/net_init.c @@ -28,36 +28,36 @@ #include <osmocom/bsc/bts_setup_ramp.h> static struct osmo_tdef gsm_network_T_defs[] = { - { .T=4, .default_val=5, .desc="Timeout to receive BSSMAP RESET ACKNOWLEDGE from the MSC" }, - { .T=7, .default_val=10, .desc="inter-BSC/MSC Handover outgoing, BSSMAP HO Required to HO Command timeout" }, - { .T=8, .default_val=10, .desc="inter-BSC/MSC Handover outgoing, BSSMAP HO Command to final Clear timeout" }, - { .T=10, .default_val=6, .desc="RR Assignment" }, - { .T=101, .default_val=10, .desc="inter-BSC/MSC Handover incoming, BSSMAP HO Request to HO Accept" }, - { .T=3101, .default_val=3, .desc="RR Immediate Assignment" }, - { .T=3103, .default_val=5, .desc="Handover" }, - { .T=3105, .default_val=100, .unit=OSMO_TDEF_MS, .desc="Physical Information" }, - { .T=3107, .default_val=5, .desc="(unused)" }, - { .T=3109, .default_val=5, .desc="RSL SACCH deactivation" }, - { .T=3111, .default_val=2, .desc="Wait time before RSL RF Channel Release" }, - { .T=3113, .default_val=7, .desc="Paging"}, - { .T=3115, .default_val=10, .desc="(unused)" }, - { .T=3117, .default_val=10, .desc="(unused)" }, - { .T=3119, .default_val=10, .desc="(unused)" }, - { .T=3122, .default_val=GSM_T3122_DEFAULT, .desc="Wait time after RR Immediate Assignment Reject" }, - { .T=3141, .default_val=10, .desc="(unused)" }, - { .T=3212, .default_val=5, .unit=OSMO_TDEF_CUSTOM, - .desc="Periodic Location Update timer, sent to MS (1 = 6 minutes)" }, - { .T=-4, .default_val=60, .desc="After Clear Request, wait for MSC to Clear Command (sanity)" }, - { .T=-5, .default_val=5, .desc="Timeout to switch dynamic timeslot PCHAN modes"}, - { .T=-6, .default_val=5, .desc="Timeout for RSL Channel Activate ACK after sending RSL Channel Activate" }, - { .T=-7, .default_val=5, .desc="Timeout for RSL IPA CRCX ACK after sending RSL IPA CRCX" }, - { .T=-8, .default_val=5, .desc="Timeout for RSL IPA MDCX ACK after sending RSL IPA MDCX" }, - { .T=-9, .default_val=5, .desc="Timeout for availability of MGW endpoint" }, - { .T=-10, .default_val=5, .desc="Timeout for fully configured MGW endpoint" }, - { .T=-11, .default_val=5, .desc="Timeout for Perform Location Response from SMLC" }, - { .T=-12, .default_val=5, .desc="Timeout for obtaining TA after BSSLAP TA Request" }, - { .T=-13, .default_val=5, .desc="Timeout for RR Channel Mode Modify ACK (BSC <-> MS)" }, - { .T=-14, .default_val=5, .desc="Timeout for RSL Channel Mode Modify ACK (BSC <-> BTS)" }, + { .T = 4, .default_val = 5, .desc = "Timeout to receive BSSMAP RESET ACKNOWLEDGE from the MSC" }, + { .T = 7, .default_val = 10, .desc = "inter-BSC/MSC Handover outgoing, BSSMAP HO Required to HO Command timeout" }, + { .T = 8, .default_val = 10, .desc = "inter-BSC/MSC Handover outgoing, BSSMAP HO Command to final Clear timeout" }, + { .T = 10, .default_val = 6, .desc = "RR Assignment" }, + { .T = 101, .default_val = 10, .desc = "inter-BSC/MSC Handover incoming, BSSMAP HO Request to HO Accept" }, + { .T = 3101, .default_val = 3, .desc = "RR Immediate Assignment" }, + { .T = 3103, .default_val = 5, .desc = "Handover" }, + { .T = 3105, .default_val = 100, .unit = OSMO_TDEF_MS, .desc = "Physical Information" }, + { .T = 3107, .default_val = 5, .desc = "(unused)" }, + { .T = 3109, .default_val = 5, .desc = "RSL SACCH deactivation" }, + { .T = 3111, .default_val = 2, .desc = "Wait time before RSL RF Channel Release" }, + { .T = 3113, .default_val = 7, .desc = "Paging"}, + { .T = 3115, .default_val = 10, .desc = "(unused)" }, + { .T = 3117, .default_val = 10, .desc = "(unused)" }, + { .T = 3119, .default_val = 10, .desc = "(unused)" }, + { .T = 3122, .default_val = GSM_T3122_DEFAULT, .desc = "Wait time after RR Immediate Assignment Reject" }, + { .T = 3141, .default_val = 10, .desc = "(unused)" }, + { .T = 3212, .default_val = 5, .unit = OSMO_TDEF_CUSTOM, + .desc = "Periodic Location Update timer, sent to MS (1 = 6 minutes)" }, + { .T = -4, .default_val = 60, .desc = "After Clear Request, wait for MSC to Clear Command (sanity)" }, + { .T = -5, .default_val = 5, .desc = "Timeout to switch dynamic timeslot PCHAN modes"}, + { .T = -6, .default_val = 5, .desc = "Timeout for RSL Channel Activate ACK after sending RSL Channel Activate" }, + { .T = -7, .default_val = 5, .desc = "Timeout for RSL IPA CRCX ACK after sending RSL IPA CRCX" }, + { .T = -8, .default_val = 5, .desc = "Timeout for RSL IPA MDCX ACK after sending RSL IPA MDCX" }, + { .T = -9, .default_val = 5, .desc = "Timeout for availability of MGW endpoint" }, + { .T = -10, .default_val = 5, .desc = "Timeout for fully configured MGW endpoint" }, + { .T = -11, .default_val = 5, .desc = "Timeout for Perform Location Response from SMLC" }, + { .T = -12, .default_val = 5, .desc = "Timeout for obtaining TA after BSSLAP TA Request" }, + { .T = -13, .default_val = 5, .desc = "Timeout for RR Channel Mode Modify ACK (BSC <-> MS)" }, + { .T = -14, .default_val = 5, .desc = "Timeout for RSL Channel Mode Modify ACK (BSC <-> BTS)" }, { .T = -16, .default_val = 1000, .unit = OSMO_TDEF_MS, .desc = "Granularity for all_allocated:* rate counters: amount of milliseconds that one counter increment" " represents. See also X17, X18" }, @@ -72,14 +72,14 @@ .desc = "Forget-sum period for all_allocated:* rate counters:" " after this amount of idle time, forget internally cumulated time remainders. Zero to always" " keep remainders. See also X16, X17." }, - { .T=-25, .default_val=5, .desc="Timeout for initial user data after an MSC initiated an SCCP connection to the BSS" }, - { .T=-3111, .default_val=4, .desc="Wait time after lchan was released in error (should be T3111 + 2s)" }, - { .T=-3210, .default_val=20, .desc="After L3 Complete, wait for MSC to confirm" }, + { .T = -25, .default_val = 5, .desc = "Timeout for initial user data after an MSC initiated an SCCP connection to the BSS" }, + { .T = -3111, .default_val = 4, .desc = "Wait time after lchan was released in error (should be T3111 + 2s)" }, + { .T = -3210, .default_val = 20, .desc = "After L3 Complete, wait for MSC to confirm" }, {} }; struct osmo_tdef g_mgw_tdefs[] = { - { .T=-2427, .default_val=5, .desc="timeout for MGCP response from MGW" }, + { .T = -2427, .default_val = 5, .desc = "timeout for MGCP response from MGW" }, {} }; diff --git a/tests/nanobts_omlattr/nanobts_omlattr_test.c b/tests/nanobts_omlattr/nanobts_omlattr_test.c index 83b6c5e..bccd99e 100644 --- a/tests/nanobts_omlattr/nanobts_omlattr_test.c +++ b/tests/nanobts_omlattr/nanobts_omlattr_test.c @@ -125,9 +125,9 @@ }; static struct osmo_tdef gsm_network_T_defs[] = { - { .T=3105, .default_val=100, .val=13, .unit=OSMO_TDEF_MS, .desc="Physical Information" }, - { .T=3212, .default_val=5, .unit=OSMO_TDEF_CUSTOM, - .desc="Periodic Location Update timer, sent to MS (1 = 6 minutes)" }, + { .T = 3105, .default_val = 100, .val = 13, .unit = OSMO_TDEF_MS, .desc = "Physical Information" }, + { .T = 3212, .default_val = 5, .unit = OSMO_TDEF_CUSTOM, + .desc = "Periodic Location Update timer, sent to MS (1 = 6 minutes)" }, {} }; -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/30270 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I01ce986a1b0cdd74d945a04ae62a07f2850d366f Gerrit-Change-Number: 30270 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-bsc[master]: tests/handover: move some functions to test/common
by osmith 22 Nov '22

22 Nov '22
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/30271 ) Change subject: tests/handover: move some functions to test/common ...................................................................... tests/handover: move some functions to test/common Move some of the functions from handover_test.c to test/common.c. This is in preparation for a new lchan_recover test, which will make use of these. Change-Id: I3df5b26ea3a6da1c1e125e07119a91c7458c6758 --- A tests/common.c A tests/common.h M tests/handover/Makefile.am M tests/handover/handover_test.c 4 files changed, 200 insertions(+), 158 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/71/30271/1 diff --git a/tests/common.c b/tests/common.c new file mode 100644 index 0000000..797dd47 --- /dev/null +++ b/tests/common.c @@ -0,0 +1,188 @@ +/* + * (C) 2013 by Andreas Eversberg <jolly(a)eversberg.eu> + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +#include <stdio.h> +#include <stdbool.h> + +#include <osmocom/core/timer.h> +#include <osmocom/core/utils.h> +#include <osmocom/gsm/gsm_utils.h> + +#include <osmocom/bsc/abis_rsl.h> +#include <osmocom/bsc/bts.h> +#include <osmocom/bsc/gsm_data.h> +#include <osmocom/bsc/system_information.h> +#include <osmocom/bsc/timeslot_fsm.h> + +const struct timeval fake_time_start_time = { 123, 456 }; + +void fake_time_passes(time_t secs, suseconds_t usecs) +{ + struct timeval diff; + /* Add time to osmo_fsm timers, using osmo_gettimeofday() */ + osmo_gettimeofday_override_add(secs, usecs); + /* Add time to penalty timers, using osmo_clock_gettime() */ + osmo_clock_override_add(CLOCK_MONOTONIC, secs, usecs * 1000); + + timersub(&osmo_gettimeofday_override_time, &fake_time_start_time, &diff); + fprintf(stderr, "Total time passed: %d.%06d s\n", (int)diff.tv_sec, (int)diff.tv_usec); + + osmo_timers_prepare(); + osmo_timers_update(); +} + +void fake_time_start(void) +{ + struct timespec *clock_override; + + /* osmo_fsm uses osmo_gettimeofday(). To affect FSM timeouts, we need osmo_gettimeofday_override. */ + osmo_gettimeofday_override_time = fake_time_start_time; + osmo_gettimeofday_override = true; + + /* Penalty timers use osmo_clock_gettime(CLOCK_MONOTONIC). To affect these timeouts, we need + * osmo_gettimeofday_override. */ + clock_override = osmo_clock_override_gettimespec(CLOCK_MONOTONIC); + OSMO_ASSERT(clock_override); + clock_override->tv_sec = fake_time_start_time.tv_sec; + clock_override->tv_nsec = fake_time_start_time.tv_usec * 1000; + osmo_clock_override_enable(CLOCK_MONOTONIC, true); + fake_time_passes(0, 0); +} + +enum gsm_phys_chan_config pchan_from_str(const char *str) +{ + enum gsm_phys_chan_config pchan; + if (!strcmp(str, "dyn")) + return GSM_PCHAN_OSMO_DYN; + if (!strcmp(str, "c+s4")) + return GSM_PCHAN_CCCH_SDCCH4; + if (!strcmp(str, "-")) + return GSM_PCHAN_NONE; + pchan = gsm_pchan_parse(str); + if (pchan < 0) { + fprintf(stderr, "Invalid timeslot pchan type: %s\n", str); + exit(1); + } + return pchan; +} + +const char * const bts_default_ts[] = { + "c+s4", "TCH/F", "TCH/F", "TCH/F", "TCH/F", "TCH/H", "TCH/H", "-", +}; + +struct gsm_bts *test_create_bts(void *ctx, int num_trx, const char * const *ts_args, int ts_args_count) +{ + static int arfcn = 870; + static int ci = 0; + struct gsm_bts *bts; + struct e1inp_sign_link *rsl_link; + int i; + int trx_i; + struct gsm_bts_trx *trx; + + fprintf(stderr, "- Creating BTS %d, %d TRX\n", bsc_gsmnet->num_bts, num_trx); + + bts = bsc_bts_alloc_register(bsc_gsmnet, GSM_BTS_TYPE_UNKNOWN, 0x3f); + if (!bts) { + fprintf(stderr, "No resource for bts1\n"); + return NULL; + } + + bts->location_area_code = 0x0017; + bts->cell_identity = ci++; + bts->c0->arfcn = arfcn++; + + bts->codec.efr = 1; + bts->codec.hr = 1; + bts->codec.amr = 1; + + rsl_link = talloc_zero(ctx, struct e1inp_sign_link); + rsl_link->trx = bts->c0; + bts->c0->rsl_link_primary = rsl_link; + + for (trx_i = 0; trx_i < num_trx; trx_i++) { + while (!(trx = gsm_bts_trx_num(bts, trx_i))) + gsm_bts_trx_alloc(bts); + + trx->mo.nm_state.operational = NM_OPSTATE_ENABLED; + trx->mo.nm_state.availability = NM_AVSTATE_OK; + trx->mo.nm_state.administrative = NM_STATE_UNLOCKED; + trx->bb_transc.mo.nm_state.operational = NM_OPSTATE_ENABLED; + trx->bb_transc.mo.nm_state.availability = NM_AVSTATE_OK; + trx->bb_transc.mo.nm_state.administrative = NM_STATE_UNLOCKED; + + /* 4 full rate and 4 half rate channels */ + for (i = 0; i < 8; i++) { + int arg_i = trx_i * 8 + i; + const char *ts_arg; + if (arg_i >= ts_args_count) + ts_arg = bts_default_ts[i]; + else + ts_arg = ts_args[arg_i]; + fprintf(stderr, "\t%s", ts_arg); + trx->ts[i].pchan_from_config = pchan_from_str(ts_arg); + if (trx->ts[i].pchan_from_config == GSM_PCHAN_NONE) + continue; + trx->ts[i].mo.nm_state.operational = NM_OPSTATE_ENABLED; + trx->ts[i].mo.nm_state.availability = NM_AVSTATE_OK; + trx->ts[i].mo.nm_state.administrative = NM_STATE_UNLOCKED; + } + fprintf(stderr, "\n"); + + for (i = 0; i < ARRAY_SIZE(trx->ts); i++) { + /* make sure ts->lchans[] get initialized */ + osmo_fsm_inst_dispatch(trx->ts[i].fi, TS_EV_RSL_READY, 0); + osmo_fsm_inst_dispatch(trx->ts[i].fi, TS_EV_OML_READY, 0); + + /* Unused dyn TS start out as used for PDCH */ + switch (trx->ts[i].pchan_on_init) { + case GSM_PCHAN_OSMO_DYN: + case GSM_PCHAN_TCH_F_PDCH: + ts_set_pchan_is(&trx->ts[i], GSM_PCHAN_PDCH); + break; + default: + break; + } + } + } + + for (i = 0; i < bsc_gsmnet->num_bts; i++) { + if (gsm_generate_si(gsm_bts_num(bsc_gsmnet, i), SYSINFO_TYPE_2) <= 0) + fprintf(stderr, "Error generating SI2\n"); + } + return bts; +} + +/* send channel activation ack */ +void send_chan_act_ack(struct gsm_lchan *lchan, int act) +{ + struct msgb *msg = msgb_alloc_headroom(256, 64, "RSL"); + struct abis_rsl_dchan_hdr *dh; + + dh = (struct abis_rsl_dchan_hdr *) msgb_put(msg, sizeof(*dh)); + dh->c.msg_discr = ABIS_RSL_MDISC_DED_CHAN; + dh->c.msg_type = (act) ? RSL_MT_CHAN_ACTIV_ACK : RSL_MT_RF_CHAN_REL_ACK; + dh->ie_chan = RSL_IE_CHAN_NR; + dh->chan_nr = gsm_lchan2chan_nr(lchan, true); + + msg->dst = rsl_chan_link(lchan); + msg->l2h = (unsigned char *)dh; + + abis_rsl_rcvmsg(msg); +} diff --git a/tests/common.h b/tests/common.h new file mode 100644 index 0000000..b0d89e4 --- /dev/null +++ b/tests/common.h @@ -0,0 +1,8 @@ +#include <sys/time.h> + +void fake_time_passes(time_t secs, suseconds_t usecs); +void fake_time_start(void); + +struct gsm_bts *test_create_bts(void *ctx, int num_trx, const char * const *ts_args, int ts_args_count); + +void send_chan_act_ack(struct gsm_lchan *lchan, int act); diff --git a/tests/handover/Makefile.am b/tests/handover/Makefile.am index 123fd61..8dc6882 100644 --- a/tests/handover/Makefile.am +++ b/tests/handover/Makefile.am @@ -31,6 +31,7 @@ $(NULL) handover_test_SOURCES = \ + ../common.c \ handover_test.c \ $(NULL) diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c index 1e91e66..7c85386 100644 --- a/tests/handover/handover_test.c +++ b/tests/handover/handover_test.c @@ -57,6 +57,7 @@ #include <osmocom/mgcp_client/mgcp_client_pool.h> #include "../../bscconfig.h" +#include "../common.h" void *ctx; @@ -95,41 +96,6 @@ uint8_t bcch_f; }; -const struct timeval fake_time_start_time = { 123, 456 }; - -void fake_time_passes(time_t secs, suseconds_t usecs) -{ - struct timeval diff; - /* Add time to osmo_fsm timers, using osmo_gettimeofday() */ - osmo_gettimeofday_override_add(secs, usecs); - /* Add time to penalty timers, using osmo_clock_gettime() */ - osmo_clock_override_add(CLOCK_MONOTONIC, secs, usecs * 1000); - - timersub(&osmo_gettimeofday_override_time, &fake_time_start_time, &diff); - fprintf(stderr, "Total time passed: %d.%06d s\n", (int)diff.tv_sec, (int)diff.tv_usec); - - osmo_timers_prepare(); - osmo_timers_update(); -} - -void fake_time_start() -{ - struct timespec *clock_override; - - /* osmo_fsm uses osmo_gettimeofday(). To affect FSM timeouts, we need osmo_gettimeofday_override. */ - osmo_gettimeofday_override_time = fake_time_start_time; - osmo_gettimeofday_override = true; - - /* Penalty timers use osmo_clock_gettime(CLOCK_MONOTONIC). To affect these timeouts, we need - * osmo_gettimeofday_override. */ - clock_override = osmo_clock_override_gettimespec(CLOCK_MONOTONIC); - OSMO_ASSERT(clock_override); - clock_override->tv_sec = fake_time_start_time.tv_sec; - clock_override->tv_nsec = fake_time_start_time.tv_usec * 1000; - osmo_clock_override_enable(CLOCK_MONOTONIC, true); - fake_time_passes(0, 0); -} - static void gen_meas_rep(struct gsm_lchan *lchan, uint8_t bs_power_db, uint8_t rxlev, uint8_t rxqual, uint8_t ta, int neighbors_count, struct neighbor_meas *neighbors) @@ -219,109 +185,6 @@ abis_rsl_rcvmsg(msg); } -enum gsm_phys_chan_config pchan_from_str(const char *str) -{ - enum gsm_phys_chan_config pchan; - if (!strcmp(str, "dyn")) - return GSM_PCHAN_OSMO_DYN; - if (!strcmp(str, "c+s4")) - return GSM_PCHAN_CCCH_SDCCH4; - if (!strcmp(str, "-")) - return GSM_PCHAN_NONE; - pchan = gsm_pchan_parse(str); - if (pchan < 0) { - fprintf(stderr, "Invalid timeslot pchan type: %s\n", str); - exit(1); - } - return pchan; -} - -const char * const bts_default_ts[] = { - "c+s4", "TCH/F", "TCH/F", "TCH/F", "TCH/F", "TCH/H", "TCH/H", "-", -}; - -static struct gsm_bts *_create_bts(int num_trx, const char * const *ts_args, int ts_args_count) -{ - static int arfcn = 870; - static int ci = 0; - struct gsm_bts *bts; - struct e1inp_sign_link *rsl_link; - int i; - int trx_i; - struct gsm_bts_trx *trx; - - fprintf(stderr, "- Creating BTS %d, %d TRX\n", bsc_gsmnet->num_bts, num_trx); - - bts = bsc_bts_alloc_register(bsc_gsmnet, GSM_BTS_TYPE_UNKNOWN, 0x3f); - if (!bts) { - fprintf(stderr, "No resource for bts1\n"); - return NULL; - } - - bts->location_area_code = 0x0017; - bts->cell_identity = ci++; - bts->c0->arfcn = arfcn++; - - bts->codec.efr = 1; - bts->codec.hr = 1; - bts->codec.amr = 1; - - rsl_link = talloc_zero(ctx, struct e1inp_sign_link); - rsl_link->trx = bts->c0; - bts->c0->rsl_link_primary = rsl_link; - - for (trx_i = 0; trx_i < num_trx; trx_i++) { - while (!(trx = gsm_bts_trx_num(bts, trx_i))) - gsm_bts_trx_alloc(bts); - - trx->mo.nm_state.operational = NM_OPSTATE_ENABLED; - trx->mo.nm_state.availability = NM_AVSTATE_OK; - trx->mo.nm_state.administrative = NM_STATE_UNLOCKED; - trx->bb_transc.mo.nm_state.operational = NM_OPSTATE_ENABLED; - trx->bb_transc.mo.nm_state.availability = NM_AVSTATE_OK; - trx->bb_transc.mo.nm_state.administrative = NM_STATE_UNLOCKED; - - /* 4 full rate and 4 half rate channels */ - for (i = 0; i < 8; i++) { - int arg_i = trx_i * 8 + i; - const char *ts_arg; - if (arg_i >= ts_args_count) - ts_arg = bts_default_ts[i]; - else - ts_arg = ts_args[arg_i]; - fprintf(stderr, "\t%s", ts_arg); - trx->ts[i].pchan_from_config = pchan_from_str(ts_arg); - if (trx->ts[i].pchan_from_config == GSM_PCHAN_NONE) - continue; - trx->ts[i].mo.nm_state.operational = NM_OPSTATE_ENABLED; - trx->ts[i].mo.nm_state.availability = NM_AVSTATE_OK; - trx->ts[i].mo.nm_state.administrative = NM_STATE_UNLOCKED; - } - fprintf(stderr, "\n"); - - for (i = 0; i < ARRAY_SIZE(trx->ts); i++) { - /* make sure ts->lchans[] get initialized */ - osmo_fsm_inst_dispatch(trx->ts[i].fi, TS_EV_RSL_READY, 0); - osmo_fsm_inst_dispatch(trx->ts[i].fi, TS_EV_OML_READY, 0); - - /* Unused dyn TS start out as used for PDCH */ - switch (trx->ts[i].pchan_on_init) { - case GSM_PCHAN_OSMO_DYN: - case GSM_PCHAN_TCH_F_PDCH: - ts_set_pchan_is(&trx->ts[i], GSM_PCHAN_PDCH); - break; - default: - break; - } - } - } - - for (i = 0; i < bsc_gsmnet->num_bts; i++) { - if (gsm_generate_si(gsm_bts_num(bsc_gsmnet, i), SYSINFO_TYPE_2) <= 0) - fprintf(stderr, "Error generating SI2\n"); - } - return bts; -} char *lchans_use_str(struct gsm_bts_trx_ts *ts, const char *established_prefix, char established_char) { @@ -603,24 +466,6 @@ static struct gsm_lchan *new_as_cmd = NULL; static struct gsm_lchan *last_as_cmd = NULL; -/* send channel activation ack */ -static void send_chan_act_ack(struct gsm_lchan *lchan, int act) -{ - struct msgb *msg = msgb_alloc_headroom(256, 64, "RSL"); - struct abis_rsl_dchan_hdr *dh; - - dh = (struct abis_rsl_dchan_hdr *) msgb_put(msg, sizeof(*dh)); - dh->c.msg_discr = ABIS_RSL_MDISC_DED_CHAN; - dh->c.msg_type = (act) ? RSL_MT_CHAN_ACTIV_ACK : RSL_MT_RF_CHAN_REL_ACK; - dh->ie_chan = RSL_IE_CHAN_NR; - dh->chan_nr = gsm_lchan2chan_nr(lchan, true); - - msg->dst = rsl_chan_link(lchan); - msg->l2h = (unsigned char *)dh; - - abis_rsl_rcvmsg(msg); -} - /* Send RR Assignment Complete for SAPI[0] */ static void send_assignment_complete(struct gsm_lchan *lchan) { @@ -932,7 +777,7 @@ int n = atoi(argv[0]); VTY_ECHO(); for (i = 0; i < n; i++) - _create_bts(1, NULL, 0); + test_create_bts(ctx, 1, NULL, 0); return CMD_SUCCESS; } @@ -947,7 +792,7 @@ { int num_trx = atoi(argv[0]); VTY_ECHO(); - _create_bts(num_trx, argv + 1, argc - 1); + test_create_bts(ctx, num_trx, argv + 1, argc - 1); return CMD_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/30271 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I3df5b26ea3a6da1c1e125e07119a91c7458c6758 Gerrit-Change-Number: 30271 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-bsc[master]: Cosmetic: lchan_fsm: drop obsolete comment
by osmith 22 Nov '22

22 Nov '22
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/30268 ) Change subject: Cosmetic: lchan_fsm: drop obsolete comment ...................................................................... Cosmetic: lchan_fsm: drop obsolete comment Neels wrote: > i guess we can drop this comment now, it is a remnant from separating > osmo-nitb -> osmo-bsc + osmo-ms Change-Id: I2ce4d691715c1ea5c7c7896693a03b0aefbdb5b9 --- M src/osmo-bsc/lchan_fsm.c 1 file changed, 0 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/68/30268/1 diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c index b1cef5d..2931f8f 100644 --- a/src/osmo-bsc/lchan_fsm.c +++ b/src/osmo-bsc/lchan_fsm.c @@ -1530,16 +1530,6 @@ lchan->release.rsl_error_cause = RSL_ERR_INTERWORKING; lchan->release.rr_cause = bsc_gsm48_rr_cause_from_rsl_cause(lchan->release.rsl_error_cause); lchan_fsm_state_chg(LCHAN_ST_WAIT_AFTER_ERROR); - /* TODO: we used to do this only for sysmobts: - int do_free = is_osmobts(ts->trx->bts); - LOGP(DRSL, LOGL_NOTICE, - "%s CHAN REL ACK for broken channel. %s.\n", - gsm_lchan_name(lchan), - do_free ? "Releasing it" : "Keeping it broken"); - if (do_free) - do_lchan_free(lchan); - * Clarify the reason. If a BTS sends a RF Chan Rel ACK, we can consider it released, - * independently from the BTS model, right?? */ return; case LCHAN_EV_RTP_RELEASED: -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/30268 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I2ce4d691715c1ea5c7c7896693a03b0aefbdb5b9 Gerrit-Change-Number: 30268 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-bsc[master]: paging: Get rid of unneeded count returned
by fixeria 22 Nov '22

22 Nov '22
Attention is currently required from: pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/30265 ) Change subject: paging: Get rid of unneeded count returned ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/30265 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I7bf04b94173f0ae7b26caf5d7f9abeeb9abf9b6c Gerrit-Change-Number: 30265 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, 22 Nov 2022 14:11:49 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bsc[master]: paging: Avoid repeated paging req lookup on BTS receiving paging resp
by fixeria 22 Nov '22

22 Nov '22
Attention is currently required from: iedemam, laforge, pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/30264 ) Change subject: paging: Avoid repeated paging req lookup on BTS receiving paging resp ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/30264 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I5f9215f31428ce0249cd9ece6d2d4e93155f429f Gerrit-Change-Number: 30264 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: iedemam <michael(a)kapsulate.com> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: iedemam <michael(a)kapsulate.com> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 22 Nov 2022 14:05:41 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • ...
  • 251
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.