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 -----
  • 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

March 2023

  • 1 participants
  • 3642 discussions
[S] Change in osmo-bsc[master]: assignment_fsm.c: make two functions static
by neels 02 Mar '23

02 Mar '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31628 ) Change subject: assignment_fsm.c: make two functions static ...................................................................... assignment_fsm.c: make two functions static Change-Id: I33eef9d105bacbb46538dff233502e834f7a3b51 --- M src/osmo-bsc/assignment_fsm.c 1 file changed, 11 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/28/31628/1 diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c index 4af4d56..b9a7930 100644 --- a/src/osmo-bsc/assignment_fsm.c +++ b/src/osmo-bsc/assignment_fsm.c @@ -42,7 +42,7 @@ static struct osmo_fsm assignment_fsm; -struct gsm_subscriber_connection *assignment_fi_conn(struct osmo_fsm_inst *fi) +static struct gsm_subscriber_connection *assignment_fi_conn(struct osmo_fsm_inst *fi) { OSMO_ASSERT(fi); OSMO_ASSERT(fi->fsm == &assignment_fsm); @@ -987,7 +987,7 @@ return 0; } -void assignment_fsm_cleanup(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause) +static void assignment_fsm_cleanup(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause) { struct gsm_subscriber_connection *conn = assignment_fi_conn(fi); assignment_reset(conn); -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31628 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I33eef9d105bacbb46538dff233502e834f7a3b51 Gerrit-Change-Number: 31628 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-bsc[master]: add timeslot.vty
by neels 02 Mar '23

02 Mar '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31626 ) Change subject: add timeslot.vty ...................................................................... add timeslot.vty Prepare some basic tests for 'timeslot' / 'phys_chan_config', because an upcoming patch will add the 'osmodyn' alias, and this test shall show the changes on the VTY. Change-Id: I2c4aab90bcbc9019ca004fb1d4945476edbb7363 --- A tests/timeslot.vty 1 file changed, 84 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/26/31626/1 diff --git a/tests/timeslot.vty b/tests/timeslot.vty new file mode 100644 index 0000000..0a2f01c --- /dev/null +++ b/tests/timeslot.vty @@ -0,0 +1,71 @@ +OsmoBSC> enable +OsmoBSC# configure terminal +OsmoBSC(config)# network +OsmoBSC(config-net)# bts 0 +OsmoBSC(config-net-bts)# trx 0 +OsmoBSC(config-net-bts-trx)# timeslot 0 + +OsmoBSC(config-net-bts-trx-ts)# list +... + phys_chan_config (none|ccch|ccch+sdcch4|tch/f|tch/h|sdcch8|pdch|tch/f_pdch|unknown|ccch+sdcch4+cbch|sdcch8+cbch|tch/f_tch/h_sdcch8_pdch) + training_sequence_code <0-7> + hopping enabled (0|1) + hopping sequence-number <0-63> + hopping maio <0-63> + hopping arfcn add <0-1023> + hopping arfcn del <0-1023> + hopping arfcn del-all + e1 line E1_LINE timeslot <1-31> sub-slot (0|1|2|3|full) + +OsmoBSC(config-net-bts-trx-ts)# phys_chan_config? + phys_chan_config Physical Channel Combination + +OsmoBSC(config-net-bts-trx-ts)# phys_chan_config ? + none Physical Channel not configured + ccch FCCH + SCH + BCCH + CCCH (Comb. IV) + ccch+sdcch4 FCCH + SCH + BCCH + CCCH + 4 SDCCH + 2 SACCH (Comb. V) + tch/f TCH/F + FACCH/F + SACCH (Comb. I) + tch/h 2 TCH/H + 2 FACCH/H + 2 SACCH (Comb. II) + sdcch8 8 SDCCH + 4 SACCH (Comb. VII) + pdch Packet Data Channel for GPRS/EDGE + tch/f_pdch Dynamic TCH/F or GPRS PDCH + unknown Unknown / Unsupported channel combination + ccch+sdcch4+cbch FCCH + SCH + BCCH + CCCH + CBCH + 3 SDCCH + 2 SACCH (Comb. V) + sdcch8+cbch 7 SDCCH + 4 SACCH + CBCH (Comb. VII) + tch/f_tch/h_sdcch8_pdch Dynamic TCH/F or TCH/H or SDCCH/8 or GPRS PDCH + +OsmoBSC(config-net-bts-trx-ts)# phys_chan_config none +OsmoBSC(config-net-bts-trx-ts)# show running-config +... + trx 0 +... + timeslot 0 + hopping enabled 0 +... + +OsmoBSC(config-net-bts-trx-ts)# phys_chan_config tch/f +OsmoBSC(config-net-bts-trx-ts)# show running-config +... + trx 0 +... + timeslot 0 + phys_chan_config TCH/F +... + +OsmoBSC(config-net-bts-trx-ts)# phys_chan_config TCH/F +OsmoBSC(config-net-bts-trx-ts)# show running-config +... + trx 0 +... + timeslot 0 + phys_chan_config TCH/F +... + +OsmoBSC(config-net-bts-trx-ts)# phys_chan_config tch/f_tch/h_sdcch8_pdch +OsmoBSC(config-net-bts-trx-ts)# show running-config +... + trx 0 +... + timeslot 0 + phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH +... -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31626 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I2c4aab90bcbc9019ca004fb1d4945476edbb7363 Gerrit-Change-Number: 31626 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-bsc[master]: cosmetic: assignment_fsm.c: naming tweaks
by neels 02 Mar '23

02 Mar '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31629 ) Change subject: cosmetic: assignment_fsm.c: naming tweaks ...................................................................... cosmetic: assignment_fsm.c: naming tweaks Reading the code, I was confused: check_requires_voice_stream() sounds like it returns a bool. Instead, it figures out chan modes and returns success or error. Clarify. Change-Id: Ib8230254dd8e0ea3cd9f65a5a2944989c56f8679 --- M src/osmo-bsc/assignment_fsm.c 1 file changed, 18 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/29/31629/1 diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c index b9a7930..7d1dc58 100644 --- a/src/osmo-bsc/assignment_fsm.c +++ b/src/osmo-bsc/assignment_fsm.c @@ -369,7 +369,7 @@ OSMO_ASSERT(osmo_fsm_register(&assignment_fsm) == 0); } -static int check_requires_voice(bool *requires_voice, enum gsm48_chan_mode chan_mode) +static int check_one_chan_mode_for_voice(bool *requires_voice, enum gsm48_chan_mode chan_mode) { *requires_voice = false; @@ -392,7 +392,7 @@ /* Check if the incoming assignment request requires a voice stream or not, * we will look at the preferred and the alternate channel mode and also make * sure that both are consistent. */ -static int check_requires_voice_stream(struct gsm_subscriber_connection *conn) +static int check_chan_modes_for_voice(struct gsm_subscriber_connection *conn) { bool requires_voice_pref = false, requires_voice_alt; struct assignment_request *req = &conn->assignment.req; @@ -405,7 +405,7 @@ * a mismatch is not permitted */ for (i = 0; i < req->n_ch_mode_rate; i++) { - rc = check_requires_voice(&requires_voice_alt, req->ch_mode_rate_list[i].chan_mode); + rc = check_one_chan_mode_for_voice(&requires_voice_alt, req->ch_mode_rate_list[i].chan_mode); if (rc < 0) { assignment_fail(GSM0808_CAUSE_REQ_CODEC_TYPE_OR_CONFIG_NOT_SUPP, "Channel mode not supported (prev level %d): %s", i, @@ -529,8 +529,8 @@ assignment_count(CTR_ASSIGNMENT_ATTEMPTED); /* Check if we need a voice stream. If yes, set the appropriate struct - * members in conn */ - if (check_requires_voice_stream(conn) < 0) + * members in conn. On error, just return (assignment_fail() has already been invoked). */ + if (check_chan_modes_for_voice(conn) < 0) return; if (!req->target_lchan && reuse_existing_lchan(conn)) { -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31629 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ib8230254dd8e0ea3cd9f65a5a2944989c56f8679 Gerrit-Change-Number: 31629 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-bsc[master]: implicitly register osmo_fsm definitions
by neels 02 Mar '23

02 Mar '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31627 ) Change subject: implicitly register osmo_fsm definitions ...................................................................... implicitly register osmo_fsm definitions I'm going to add a regression test that probes lchan_fsm. I noticed that I have to call lchan_fsm_init() for osmo_fsm_register(). Let's make this implicit as we usually do now, to not have to register FSMs in tests. Change-Id: I58760e743c78a370aedc9720f265c0f8da5c2045 --- M include/osmocom/bsc/assignment_fsm.h M include/osmocom/bsc/bsc_subscr_conn_fsm.h M include/osmocom/bsc/handover_fsm.h M include/osmocom/bsc/lchan_fsm.h M src/osmo-bsc/assignment_fsm.c M src/osmo-bsc/bsc_subscr_conn_fsm.c M src/osmo-bsc/handover_fsm.c M src/osmo-bsc/lchan_fsm.c M src/osmo-bsc/lchan_rtp_fsm.c M src/osmo-bsc/osmo_bsc_main.c M tests/handover/handover_test.c 11 files changed, 18 insertions(+), 25 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/27/31627/1 diff --git a/include/osmocom/bsc/assignment_fsm.h b/include/osmocom/bsc/assignment_fsm.h index 3dffaf2..17f8c4f 100644 --- a/include/osmocom/bsc/assignment_fsm.h +++ b/include/osmocom/bsc/assignment_fsm.h @@ -40,8 +40,6 @@ ASSIGNMENT_EV_CONN_RELEASING, }; -void assignment_fsm_init(void); - int reassignment_request_to_lchan(enum assign_for assign_for, struct gsm_lchan *lchan, struct gsm_lchan *to_lchan, int tsc_set, int tsc); int reassignment_request_to_chan_type(enum assign_for assign_for, struct gsm_lchan *lchan, diff --git a/include/osmocom/bsc/bsc_subscr_conn_fsm.h b/include/osmocom/bsc/bsc_subscr_conn_fsm.h index b358da6..766d56a 100644 --- a/include/osmocom/bsc/bsc_subscr_conn_fsm.h +++ b/include/osmocom/bsc/bsc_subscr_conn_fsm.h @@ -57,8 +57,6 @@ struct assignment_request; struct gsm_lchan; -void bsc_subscr_conn_fsm_init(void); - /* Allocate a subscriber connection and its associated FSM */ struct gsm_subscriber_connection *bsc_subscr_con_allocate(struct gsm_network *net); void gscon_update_id(struct gsm_subscriber_connection *conn); diff --git a/include/osmocom/bsc/handover_fsm.h b/include/osmocom/bsc/handover_fsm.h index faec73f..03a8436 100644 --- a/include/osmocom/bsc/handover_fsm.h +++ b/include/osmocom/bsc/handover_fsm.h @@ -55,8 +55,6 @@ const uint8_t *access_delay; }; -void handover_fsm_init(void); - int handover_request(struct handover_out_req *req); void handover_start(struct handover_out_req *req); void handover_start_inter_bsc_in(struct gsm_subscriber_connection *conn, diff --git a/include/osmocom/bsc/lchan_fsm.h b/include/osmocom/bsc/lchan_fsm.h index cc231dc..b179a7f 100644 --- a/include/osmocom/bsc/lchan_fsm.h +++ b/include/osmocom/bsc/lchan_fsm.h @@ -56,8 +56,6 @@ LCHAN_EV_REQUEST_MODE_MODIFY, }; -void lchan_fsm_init(void); - void lchan_fsm_alloc(struct gsm_lchan *lchan); void lchan_release(struct gsm_lchan *lchan, bool do_rr_release, bool err, enum gsm48_rr_cause cause_rr, diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c index d382f10..4af4d56 100644 --- a/src/osmo-bsc/assignment_fsm.c +++ b/src/osmo-bsc/assignment_fsm.c @@ -364,7 +364,7 @@ } } -void assignment_fsm_init(void) +static __attribute__((constructor)) void assignment_fsm_init(void) { OSMO_ASSERT(osmo_fsm_register(&assignment_fsm) == 0); } diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c index 9c0fdcf..ebfbe82 100644 --- a/src/osmo-bsc/bsc_subscr_conn_fsm.c +++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c @@ -1208,7 +1208,7 @@ .event_names = gscon_fsm_event_names, }; -void bsc_subscr_conn_fsm_init(void) +static __attribute__((constructor)) void bsc_subscr_conn_fsm_init(void) { OSMO_ASSERT(osmo_fsm_register(&gscon_fsm) == 0); OSMO_ASSERT(osmo_fsm_register(&lcls_fsm) == 0); diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c index 251ea5b..e8581c5 100644 --- a/src/osmo-bsc/handover_fsm.c +++ b/src/osmo-bsc/handover_fsm.c @@ -293,7 +293,7 @@ }; } -void handover_fsm_init(void) +static __attribute__((constructor)) void handover_fsm_init(void) { OSMO_ASSERT(osmo_fsm_register(&ho_fsm) == 0); } diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c index ab3fbdd..717f9be 100644 --- a/src/osmo-bsc/lchan_fsm.c +++ b/src/osmo-bsc/lchan_fsm.c @@ -461,12 +461,9 @@ osmo_fsm_inst_update_id_f(lchan->fi_rtp, lchan->fi->id); } -extern void lchan_rtp_fsm_init(); - -void lchan_fsm_init(void) +static __attribute__((constructor)) void lchan_fsm_init(void) { OSMO_ASSERT(osmo_fsm_register(&lchan_fsm) == 0); - lchan_rtp_fsm_init(); } static void lchan_reset(struct gsm_lchan *lchan); diff --git a/src/osmo-bsc/lchan_rtp_fsm.c b/src/osmo-bsc/lchan_rtp_fsm.c index 8b61f1e..4cfec54 100644 --- a/src/osmo-bsc/lchan_rtp_fsm.c +++ b/src/osmo-bsc/lchan_rtp_fsm.c @@ -70,7 +70,7 @@ } while (0) /* Called from lchan_fsm_init(), does not need to be visible in lchan_rtp_fsm.h */ -void lchan_rtp_fsm_init(void) +static __attribute__((constructor)) void lchan_rtp_fsm_init(void) { OSMO_ASSERT(osmo_fsm_register(&lchan_rtp_fsm) == 0); } diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index 5ad13ca..69f2721 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -924,10 +924,6 @@ /* seed the PRNG */ srand(time(NULL)); - lchan_fsm_init(); - bsc_subscr_conn_fsm_init(); - assignment_fsm_init(); - handover_fsm_init(); lb_init(); acc_ramp_global_init(); paging_global_init(); diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c index 2c54526..bf91f02 100644 --- a/tests/handover/handover_test.c +++ b/tests/handover/handover_test.c @@ -1687,11 +1687,6 @@ bsc_vty_init(bsc_gsmnet); ho_test_vty_init(); - lchan_fsm_init(); - bsc_subscr_conn_fsm_init(); - handover_fsm_init(); - assignment_fsm_init(); - ho_set_algorithm(bsc_gsmnet->ho, 2); ho_set_ho_active(bsc_gsmnet->ho, true); ho_set_hodec2_as_active(bsc_gsmnet->ho, true); -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31627 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I58760e743c78a370aedc9720f265c0f8da5c2045 Gerrit-Change-Number: 31627 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-bsc[master]: bsc_test: add 'update_exp'
by neels 02 Mar '23

02 Mar '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31630 ) Change subject: bsc_test: add 'update_exp' ...................................................................... bsc_test: add 'update_exp' Change-Id: I0e758e264f0bba76a78839931a72245d98936b8f --- M tests/bsc/Makefile.am 1 file changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/30/31630/1 diff --git a/tests/bsc/Makefile.am b/tests/bsc/Makefile.am index 5056c18..6b5c3e8 100644 --- a/tests/bsc/Makefile.am +++ b/tests/bsc/Makefile.am @@ -43,3 +43,7 @@ $(LIBRARY_GSM) \ -lrt \ $(NULL) + +.PHONY: update_exp +update_exp: + $(builddir)/bsc_test > $(srcdir)/bsc_test.ok -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31630 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I0e758e264f0bba76a78839931a72245d98936b8f Gerrit-Change-Number: 31630 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-bsc[master]: tweak gsm_pchan_ids[]: s/OSMO_DYN/OSMODYN
by neels 02 Mar '23

02 Mar '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31632 ) Change subject: tweak gsm_pchan_ids[]: s/OSMO_DYN/OSMODYN ...................................................................... tweak gsm_pchan_ids[]: s/OSMO_DYN/OSMODYN This patch affects *only* on osmo_fsm instance IDs, which are visible on the CTRL and VTY interfaces to identify FSM instances, and in the log. Why bother: An upcoming patch wants to replace gsm_pchan_ids[] with osmo_fsm_inst_update_id_f_sanitize(gsm_pchan_name(x)), this is an explicit step to match gsm_pchan_names[]. Why drop the underscore: On the VTY, in phys_chan_config names, there commonly is an underscore separator to indicate that a timeslot can become either of the parts, e.g. TCH/F_PDCH means the timeslot can be TCH/F, or it can be PDCH. The name "OSMO_DYN" would then imply that it can be either OSMO, or DYN, so let's rather name it OSMODYN. Change-Id: I4a540744cced466f0ca4fc605db4d0ec14ee8e87 --- M TODO-RELEASE M src/osmo-bsc/gsm_data.c M tests/bsc/bsc_test.ok 3 files changed, 27 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/32/31632/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index d0852fc..ab85fc3 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,3 +7,4 @@ # If any interfaces have been added since the last public release: c:r:a + 1. # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line + osmo-bsc CTRL,VTY osmo_fsm instance IDs are tweaked: OSMO_DYN becomes OSMODYN diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c index 96c291d..33a878b 100644 --- a/src/osmo-bsc/gsm_data.c +++ b/src/osmo-bsc/gsm_data.c @@ -207,7 +207,7 @@ { GSM_PCHAN_UNKNOWN, "UNKNOWN" }, { GSM_PCHAN_CCCH_SDCCH4_CBCH, "CCCH_SDCCH4_CBCH" }, { GSM_PCHAN_SDCCH8_SACCH8C_CBCH, "SDCCH8_CBCH" }, - { GSM_PCHAN_OSMO_DYN, "OSMO_DYN" }, + { GSM_PCHAN_OSMO_DYN, "OSMODYN" }, { 0, NULL } }; diff --git a/tests/bsc/bsc_test.ok b/tests/bsc/bsc_test.ok index bb255ad..f0adbd1 100644 --- a/tests/bsc/bsc_test.ok +++ b/tests/bsc/bsc_test.ok @@ -48,8 +48,8 @@ lchan->fi->id = 0-1-0-SDCCH8_CBCH-0 assignment.fi->id = msc4294967295-conn123_subscr-TMSI-0x00000423_0-1-0-SDCCH8_CBCH-0 pchan=OSMODYN: - ts->fi->id = 0-1-0-OSMO_DYN - lchan->fi->id = 0-1-0-OSMO_DYN-0 - assignment.fi->id = msc4294967295-conn123_subscr-TMSI-0x00000423_0-1-0-OSMO_DYNasNONE-0 + ts->fi->id = 0-1-0-OSMODYN + lchan->fi->id = 0-1-0-OSMODYN-0 + assignment.fi->id = msc4294967295-conn123_subscr-TMSI-0x00000423_0-1-0-OSMODYNasNONE-0 Testing execution completed. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31632 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I4a540744cced466f0ca4fc605db4d0ec14ee8e87 Gerrit-Change-Number: 31632 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-bsc[master]: bsc_test.c: test FSM IDs that contain pchan names
by neels 02 Mar '23

02 Mar '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31631 ) Change subject: bsc_test.c: test FSM IDs that contain pchan names ...................................................................... bsc_test.c: test FSM IDs that contain pchan names Show the timeslot_fsm, lchan_fsm, assignment_fsm fi->id strings. The IDs include the current pchan configuration. I want to tweak the composition of these in an upcoming patch, so the test should show whether any FSM IDs change from that. Change-Id: If369f23fa140b9d7792f5a511815cbbd14b371e9 --- M include/osmocom/bsc/assignment_fsm.h M src/osmo-bsc/assignment_fsm.c M tests/bsc/bsc_test.c M tests/bsc/bsc_test.ok 4 files changed, 130 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/31/31631/1 diff --git a/include/osmocom/bsc/assignment_fsm.h b/include/osmocom/bsc/assignment_fsm.h index 17f8c4f..70cb88c 100644 --- a/include/osmocom/bsc/assignment_fsm.h +++ b/include/osmocom/bsc/assignment_fsm.h @@ -48,3 +48,4 @@ void assignment_fsm_start(struct gsm_subscriber_connection *conn, struct gsm_bts *bts, struct assignment_request *req); void assignment_reset(struct gsm_subscriber_connection *conn); +void assignment_fsm_update_id(struct gsm_subscriber_connection *conn); diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c index 7d1dc58..2be11ae 100644 --- a/src/osmo-bsc/assignment_fsm.c +++ b/src/osmo-bsc/assignment_fsm.c @@ -303,7 +303,7 @@ osmo_fsm_inst_term(conn->assignment.fi, OSMO_FSM_TERM_REGULAR, 0); } -static void assignment_fsm_update_id(struct gsm_subscriber_connection *conn) +void assignment_fsm_update_id(struct gsm_subscriber_connection *conn) { /* Assignment can do a new channel activation, in which case new_lchan points at the new lchan. * Or assignment can Channel Mode Modify the already used lchan, in which case new_lchan == NULL. */ diff --git a/tests/bsc/bsc_test.c b/tests/bsc/bsc_test.c index 4a97b9f..62757b4 100644 --- a/tests/bsc/bsc_test.c +++ b/tests/bsc/bsc_test.c @@ -29,6 +29,12 @@ #include <osmocom/bsc/osmo_bsc.h> #include <osmocom/bsc/bsc_msc_data.h> +#include <osmocom/bsc/bss.h> +#include <osmocom/bsc/bts.h> +#include <osmocom/bsc/timeslot_fsm.h> +#include <osmocom/bsc/lchan_fsm.h> +#include <osmocom/bsc/assignment_fsm.h> +#include <osmocom/bsc/bsc_subscr_conn_fsm.h> #include <osmocom/gsm/gad.h> #include <osmocom/core/application.h> @@ -180,6 +186,61 @@ bsc_gsmnet = NULL; } +static void test_fsm_ids_with_pchan_names(void) +{ + struct gsm_network *net; + struct gsm_bts *bts; + struct gsm_bts_trx *trx; + struct gsm_bts_trx_ts *ts; + struct gsm_lchan *lchan; + enum gsm_phys_chan_config pchan; + struct gsm_subscriber_connection *conn; + + rate_ctr_init(ctx); + tall_bsc_ctx = ctx; + bsc_network_alloc(); + net = bsc_gsmnet; + + /* Have a BTS so that we have trx, timeslots, lchans that have FSMs to check the id of */ + bts = bsc_bts_alloc_register(net, GSM_BTS_TYPE_UNKNOWN, HARDCODED_BSIC); + trx = gsm_bts_trx_alloc(bts); + + printf("\nTesting FSM ids that contain pchan names\n"); + ts = &trx->ts[0]; + lchan = &ts->lchan[0]; + + conn = bsc_subscr_con_allocate(net); + conn->lchan = lchan; + conn->assignment.new_lchan = lchan; + conn->sccp.conn_id = 123; + conn->bsub = bsc_subscr_find_or_create_by_tmsi(net->bsc_subscribers, 0x423, "test"); + gscon_update_id(conn); + + /* dirty dirty hack, to just point at some fi so we can update the id */ + conn->assignment.fi = trx->ts[1].fi; + + for (pchan = 0; pchan < _GSM_PCHAN_MAX; pchan++) { + ts->pchan_from_config = pchan; + /* trigger ID update in ts and lchan */ + osmo_fsm_inst_dispatch(ts->fi, TS_EV_OML_READY, NULL); + + if (lchan->fi) + assignment_fsm_update_id(conn); + + printf("pchan=%s:\n ts->fi->id = %s\n lchan->fi->id = %s\n assignment.fi->id = %s\n", + gsm_pchan_name(pchan), + ts->fi->id, + lchan->fi ? lchan->fi->id : "null", + lchan->fi ? conn->assignment.fi->id : "null"); + + osmo_fsm_inst_dispatch(ts->fi, TS_EV_OML_DOWN, NULL); + } + + talloc_free(net); + bsc_gsmnet = NULL; + printf("\n"); +} + static const struct log_info_cat log_categories[] = { [DNM] = { .name = "DNM", @@ -216,6 +277,7 @@ osmo_init_logging2(ctx, &log_info); test_scan(); + test_fsm_ids_with_pchan_names(); printf("Testing execution completed.\n"); talloc_free(ctx); diff --git a/tests/bsc/bsc_test.ok b/tests/bsc/bsc_test.ok index 0564bf0..bb255ad 100644 --- a/tests/bsc/bsc_test.ok +++ b/tests/bsc/bsc_test.ok @@ -1,4 +1,55 @@ Testing BTS<->MSC message scan. Going to test item: 0 Going to test item: 1 + +Testing FSM ids that contain pchan names +pchan=NONE: + ts->fi->id = 0-1-0-NONE + lchan->fi->id = null + assignment.fi->id = null +pchan=CCCH: + ts->fi->id = 0-1-0-CCCH + lchan->fi->id = null + assignment.fi->id = null +pchan=CCCH+SDCCH4: + ts->fi->id = 0-1-0-CCCH_SDCCH4 + lchan->fi->id = 0-1-0-CCCH_SDCCH4-0 + assignment.fi->id = msc4294967295-conn123_subscr-TMSI-0x00000423_0-1-0-CCCH_SDCCH4-0 +pchan=TCH/F: + ts->fi->id = 0-1-0-TCH_F + lchan->fi->id = 0-1-0-TCH_F-0 + assignment.fi->id = msc4294967295-conn123_subscr-TMSI-0x00000423_0-1-0-TCH_F-0 +pchan=TCH/H: + ts->fi->id = 0-1-0-TCH_H + lchan->fi->id = 0-1-0-TCH_H-0 + assignment.fi->id = msc4294967295-conn123_subscr-TMSI-0x00000423_0-1-0-TCH_H-0 +pchan=SDCCH8: + ts->fi->id = 0-1-0-SDCCH8 + lchan->fi->id = 0-1-0-SDCCH8-0 + assignment.fi->id = msc4294967295-conn123_subscr-TMSI-0x00000423_0-1-0-SDCCH8-0 +pchan=PDCH: + ts->fi->id = 0-1-0-PDCH + lchan->fi->id = null + assignment.fi->id = null +pchan=TCH/F_PDCH: + ts->fi->id = 0-1-0-TCH_F_PDCH + lchan->fi->id = 0-1-0-TCH_F_PDCH-0 + assignment.fi->id = msc4294967295-conn123_subscr-TMSI-0x00000423_0-1-0-TCH_F_PDCHasTCH_F-0 +pchan=UNKNOWN: + ts->fi->id = 0-1-0-UNKNOWN + lchan->fi->id = null + assignment.fi->id = null +pchan=CCCH+SDCCH4+CBCH: + ts->fi->id = 0-1-0-CCCH_SDCCH4_CBCH + lchan->fi->id = 0-1-0-CCCH_SDCCH4_CBCH-0 + assignment.fi->id = msc4294967295-conn123_subscr-TMSI-0x00000423_0-1-0-CCCH_SDCCH4_CBCH-0 +pchan=SDCCH8+CBCH: + ts->fi->id = 0-1-0-SDCCH8_CBCH + lchan->fi->id = 0-1-0-SDCCH8_CBCH-0 + assignment.fi->id = msc4294967295-conn123_subscr-TMSI-0x00000423_0-1-0-SDCCH8_CBCH-0 +pchan=OSMODYN: + ts->fi->id = 0-1-0-OSMO_DYN + lchan->fi->id = 0-1-0-OSMO_DYN-0 + assignment.fi->id = msc4294967295-conn123_subscr-TMSI-0x00000423_0-1-0-OSMO_DYNasNONE-0 + Testing execution completed. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31631 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: If369f23fa140b9d7792f5a511815cbbd14b371e9 Gerrit-Change-Number: 31631 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-bsc[master]: vty: add 'osmodyn' as alias for 'tch/f_tch/h_sdcch8_pdch'
by neels 01 Mar '23

01 Mar '23
Attention is currently required from: fixeria, pespin. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31615 ) Change subject: vty: add 'osmodyn' as alias for 'tch/f_tch/h_sdcch8_pdch' ...................................................................... Patch Set 1: Code-Review-1 (1 comment) File src/osmo-bsc/gsm_data.c: https://gerrit.osmocom.org/c/osmo-bsc/+/31615/comment/9a0f49f5_6cec40b9 PS1, Line 192: { GSM_PCHAN_OSMO_DYN, "OSMODYN" }, > not in the 'ts' / 'phys_chan_config' command we don't! see bts_trx_vty_init(). […] (and of course i forgot to add a matching gsm_pchant_descs[] entry because the stupid gsm_pchan_ids[] is in between, hence the python tests fail, which a vty test would have made my realize.) -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31615 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I37719edd867c777d1ce944b8e2f1efffac38f00e Gerrit-Change-Number: 31615 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 01 Mar 2023 22:48:41 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-bsc[master]: vty: add 'osmodyn' as alias for 'tch/f_tch/h_sdcch8_pdch'
by neels 01 Mar '23

01 Mar '23
Attention is currently required from: fixeria, pespin. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31615 ) Change subject: vty: add 'osmodyn' as alias for 'tch/f_tch/h_sdcch8_pdch' ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: > How about changing the config examples? yep! thx -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31615 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I37719edd867c777d1ce944b8e2f1efffac38f00e Gerrit-Change-Number: 31615 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 01 Mar 2023 22:46:11 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-bsc[master]: vty: add 'osmodyn' as alias for 'tch/f_tch/h_sdcch8_pdch'
by neels 01 Mar '23

01 Mar '23
Attention is currently required from: pespin. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31615 ) Change subject: vty: add 'osmodyn' as alias for 'tch/f_tch/h_sdcch8_pdch' ...................................................................... Patch Set 1: (1 comment) File src/osmo-bsc/gsm_data.c: https://gerrit.osmocom.org/c/osmo-bsc/+/31615/comment/dac921f8_93d18781 PS1, Line 192: { GSM_PCHAN_OSMO_DYN, "OSMODYN" }, > We use "OSMO_DYN", see line 209. not in the 'ts' / 'phys_chan_config' command we don't! see bts_trx_vty_init(). oh, are you saying I should rather name it "OSMO_DYN"? I think that would be wrong, because in the phys_chan_config command, the underscore serves as a separator. Like "TCH/F_PDCH" is either "TCH/F" or "PDCH". "OSMO_DYN" would look like it is a pchan offering one of "OSMO" or "DYN". (the "+" separator is about pchans that offer multiple things at the same time, the "_" is for alternative modes) But I'm a bit puzzled, where do we use gsm_pchan_ids[] then? ... we only use it in timeslot_fsm.c, lchan_fsm.c, assignment_fsm.c. It is the CTRL-interface id compatible name for gsm_pchant_names. I guess we want to remove gsm_pchan_ids[], rather use gsm_pchant_names[] and use osmo_fsm_inst_update_id_f_sanitize() there? I'll see in a separate patch. This confusion makes me notice that this patch should have a vty test to go with it. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31615 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I37719edd867c777d1ce944b8e2f1efffac38f00e Gerrit-Change-Number: 31615 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 01 Mar 2023 22:45:55 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 350
  • 351
  • 352
  • 353
  • 354
  • 355
  • 356
  • ...
  • 365
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.