lists.osmocom.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
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
List overview
Download
gerrit-log
April 2023
----- 2025 -----
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
gerrit-log@lists.osmocom.org
1 participants
2252 discussions
Start a n
N
ew thread
[L] Change in osmo-pcu[master]: alloc_algo: Pass a struct containing all req params
by pespin
Attention is currently required from: fixeria. pespin has posted comments on this change. (
https://gerrit.osmocom.org/c/osmo-pcu/+/32397
) Change subject: alloc_algo: Pass a struct containing all req params ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit
https://gerrit.osmocom.org/c/osmo-pcu/+/32397
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ie4d9ace526ad012d97738bc55bdb5cc1472c632d Gerrit-Change-Number: 32397 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Fri, 21 Apr 2023 13:34:15 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
2 years, 2 months
1
0
0
0
[S] Change in osmo-pcu[master]: vty: Several improvements to 'show ms' output format
by pespin
pespin has submitted this change. (
https://gerrit.osmocom.org/c/osmo-pcu/+/32396
) Change subject: vty: Several improvements to 'show ms' output format ...................................................................... vty: Several improvements to 'show ms' output format * Use UL/DL acronyms to decrease output verbosity * Keep more stable MS properties at the top, move link quality changing entries to the bottom putting them together. Change-Id: If9f4c6ba1a4a6f9060222cc04254054ad03d7a96 --- M src/pcu_vty_functions.cpp 1 file changed, 27 insertions(+), 14 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, approved diff --git a/src/pcu_vty_functions.cpp b/src/pcu_vty_functions.cpp index b7fcc8f..8dd147c 100644 --- a/src/pcu_vty_functions.cpp +++ b/src/pcu_vty_functions.cpp @@ -158,11 +158,6 @@ } else { vty_out(vty, " State: ACTIVE%s", VTY_NEWLINE); } - vty_out(vty, " Timing advance (TA): %d%s", ms_ta(ms), VTY_NEWLINE); - vty_out(vty, " Coding scheme uplink: %s%s", mcs_name(ms_current_cs_ul(ms)), - VTY_NEWLINE); - vty_out(vty, " Coding scheme downlink: %s%s", mcs_name(ms_current_cs_dl(ms, ms_mode(ms))), - VTY_NEWLINE); vty_out(vty, " Mode: %s%s", mode_name(ms_mode(ms)), VTY_NEWLINE); vty_out(vty, " MS class: %d%s", ms_ms_class(ms), VTY_NEWLINE); vty_out(vty, " EGPRS MS class: %d%s", ms_egprs_ms_class(ms), VTY_NEWLINE); @@ -170,12 +165,17 @@ slots = ms_current_pacch_slots(ms); for (int i = 0; i < 8; i++) if (slots & (1 << i)) - vty_out(vty, "%d ", i); + vty_out(vty, "TS%d ", i); vty_out(vty, "%s", VTY_NEWLINE); - vty_out(vty, " LLC queue length: %zd%s", llc_queue_size(ms_llc_queue(ms)), + vty_out(vty, " DL LLC queue length: %zd%s", llc_queue_size(ms_llc_queue(ms)), VTY_NEWLINE); - vty_out(vty, " LLC queue octets: %zd%s", llc_queue_octets(ms_llc_queue(ms)), + vty_out(vty, " DL LLC queue octets: %zd%s", llc_queue_octets(ms_llc_queue(ms)), VTY_NEWLINE); + vty_out(vty, " DL Coding Scheme: %s%s", mcs_name(ms_current_cs_dl(ms, ms_mode(ms))), + VTY_NEWLINE); + vty_out(vty, " UL Coding Scheme: %s%s", mcs_name(ms_current_cs_ul(ms)), + VTY_NEWLINE); + vty_out(vty, " Timing advance (TA): %d%s", ms_ta(ms), VTY_NEWLINE); if (ms->l1_meas.have_rssi) vty_out(vty, " RSSI: %d dBm%s", ms->l1_meas.rssi, VTY_NEWLINE); @@ -192,7 +192,7 @@ vty_out(vty, " Downlink NACK rate: %d %%%s", ms_nack_rate_dl(ms), VTY_NEWLINE); if (ms->l1_meas.have_ms_rx_qual) - vty_out(vty, " MS RX quality: %d %%%s", + vty_out(vty, " MS Rx quality: %d %%%s", ms->l1_meas.ms_rx_qual, VTY_NEWLINE); if (ms->l1_meas.have_ms_c_value) vty_out(vty, " MS C value: %d dB%s", @@ -206,25 +206,25 @@ i, ms->l1_meas.ts[i].ms_i_level, VTY_NEWLINE); } if (ms_ul_tbf(ms)) - vty_out(vty, " Uplink TBF: TFI=%d, state=%s%s", + vty_out(vty, " UL TBF: TFI=%d, state=%s%s", ms_ul_tbf(ms)->tfi(), ms_ul_tbf(ms)->state_name(), VTY_NEWLINE); if (ms_dl_tbf(ms)) { - vty_out(vty, " Downlink TBF: TFI=%d, state=%s%s", + vty_out(vty, " DL TBF: TFI=%d, state=%s%s", ms_dl_tbf(ms)->tfi(), ms_dl_tbf(ms)->state_name(), VTY_NEWLINE); - vty_out(vty, " Current DL Throughput: %d Kbps %s", + vty_out(vty, " Current DL Throughput: %d Kbps%s", ms_dl_tbf(ms)->m_bw.dl_throughput, VTY_NEWLINE); } llist_for_each_entry(i_tbf, &ms->old_tbfs, list) { struct gprs_rlcmac_tbf *tbf = (struct gprs_rlcmac_tbf *)i_tbf->entry; - vty_out(vty, " Old %-19s TFI=%d, state=%s%s", + vty_out(vty, " Old %s TBF: TFI=%d, state=%s%s", tbf_direction(tbf) == GPRS_RLCMAC_UL_TBF ? - "Uplink TBF:" : "Downlink TBF:", + "UL" : "DL", tbf->tfi(), tbf->state_name(), VTY_NEWLINE); -- To view, visit
https://gerrit.osmocom.org/c/osmo-pcu/+/32396
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: If9f4c6ba1a4a6f9060222cc04254054ad03d7a96 Gerrit-Change-Number: 32396 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
2 years, 2 months
1
0
0
0
[S] Change in osmo-pcu[master]: vty: Several improvements to 'show ms' output format
by osmith
Attention is currently required from: pespin. osmith has posted comments on this change. (
https://gerrit.osmocom.org/c/osmo-pcu/+/32396
) Change subject: vty: Several improvements to 'show ms' output format ...................................................................... Patch Set 3: Code-Review+2 (4 comments) File src/pcu_vty_functions.cpp:
https://gerrit.osmocom.org/c/osmo-pcu/+/32396/comment/baf7b760_f95e3481
PS2, Line 174: UL > DL Done
https://gerrit.osmocom.org/c/osmo-pcu/+/32396/comment/aba32a8c_91faf57f
PS2, Line 176: DL > UL Done
https://gerrit.osmocom.org/c/osmo-pcu/+/32396/comment/141022a3_58e9f832
PS2, Line 214: > adjust indentation here too? Done
https://gerrit.osmocom.org/c/osmo-pcu/+/32396/comment/13fa9396_c5dfdd65
PS2, Line 227: "DL" : "UL" > "UL" : "DL" Done -- To view, visit
https://gerrit.osmocom.org/c/osmo-pcu/+/32396
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: If9f4c6ba1a4a6f9060222cc04254054ad03d7a96 Gerrit-Change-Number: 32396 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 21 Apr 2023 13:25:47 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: comment
2 years, 2 months
1
0
0
0
[M] Change in osmo-pcu[master]: Add new log category 'ms'
by pespin
pespin has submitted this change. (
https://gerrit.osmocom.org/c/osmo-pcu/+/32383
) ( 6 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: Add new log category 'ms' ...................................................................... Add new log category 'ms' This is useful to track the lifecycle of MS objects. The RLCMAC cateogry used so far in those log messages is too broad. Change-Id: Ib4ce88d0f7309ac77c064a94bb0d667e8dbc33dd --- M src/gprs_debug.c M src/gprs_debug.h M src/gprs_ms.c M tests/app_info/AppInfoTest.cpp M tests/ms/MsTest.cpp M tests/tbf/TbfTest.cpp M tests/ulc/PdchUlcTest.cpp 7 files changed, 50 insertions(+), 30 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved diff --git a/src/gprs_debug.c b/src/gprs_debug.c index 8aeca5b..ba9aeec 100644 --- a/src/gprs_debug.c +++ b/src/gprs_debug.c @@ -79,6 +79,13 @@ .loglevel = LOGL_NOTICE, .enabled = 1, }, + [DMS] = { + .name = "DMS", + .color = "\033[1;34m", + .description = "Mobile Station (MS)", + .loglevel = LOGL_NOTICE, + .enabled = 1, + }, [DTBF] = { .name = "DTBF", .color = "\033[1;34m", diff --git a/src/gprs_debug.h b/src/gprs_debug.h index db9630c..b66de90 100644 --- a/src/gprs_debug.h +++ b/src/gprs_debug.h @@ -34,6 +34,7 @@ DRLCMACUL, DRLCMACSCHED, DRLCMACMEAS, + DMS, DTBF, DTBFDL, DTBFUL, diff --git a/src/gprs_ms.c b/src/gprs_ms.c index 7df71e8..1b51d4d 100644 --- a/src/gprs_ms.c +++ b/src/gprs_ms.c @@ -82,7 +82,7 @@ level = LOGL_DEBUG; - LOGPSRC(DRLCMAC, level, file, line, "%s: %s %s: now used by %s\n", + LOGPSRC(DMS, level, file, line, "%s: %s %s: now used by %s\n", ms_name(ms), (e->count - old_use_count) > 0 ? "+" : "-", e->use, (osmo_use_count_to_str_buf(buf, sizeof(buf), &ms->use_count), buf)); @@ -100,7 +100,7 @@ static void ms_release_timer_cb(void *data) { struct GprsMs *ms = (struct GprsMs *) data; - LOGPMS(ms, DRLCMAC, LOGL_INFO, "Release timer expired\n"); + LOGPMS(ms, DMS, LOGL_INFO, "Release timer expired\n"); /* Finally free the MS after being idle for a while according to config */ talloc_free(ms); @@ -148,7 +148,7 @@ int codel_interval = LLC_CODEL_USE_DEFAULT; - LOGP(DRLCMAC, LOGL_INFO, "Creating MS object\n"); + LOGP(DMS, LOGL_INFO, "Creating MS object\n"); ms->imsi[0] = '\0'; osmo_timer_setup(&ms->timer, ms_release_timer_cb, ms); @@ -184,7 +184,7 @@ { struct llist_item *pos, *tmp; - LOGPMS(ms, DRLCMAC, LOGL_INFO, "Destroying MS object\n"); + LOGPMS(ms, DMS, LOGL_INFO, "Destroying MS object\n"); bts_stat_item_dec(ms->bts, STAT_MS_PRESENT); llist_del(&ms->list); @@ -240,7 +240,7 @@ return; } - LOGPMS(ms, DRLCMAC, LOGL_DEBUG, "Schedule MS release in %u secs\n", ms->delay); + LOGPMS(ms, DMS, LOGL_DEBUG, "Schedule MS release in %u secs\n", ms->delay); osmo_timer_schedule(&ms->timer, ms->delay, 0); } @@ -249,7 +249,7 @@ if (!osmo_timer_pending(&ms->timer)) return; - LOGPMS(ms, DRLCMAC, LOGL_DEBUG, "Cancel scheduled MS release\n"); + LOGPMS(ms, DMS, LOGL_DEBUG, "Cancel scheduled MS release\n"); osmo_timer_del(&ms->timer); } @@ -329,7 +329,7 @@ static void ms_attach_ul_tbf(struct GprsMs *ms, struct gprs_rlcmac_ul_tbf *tbf) { - LOGPMS(ms, DRLCMAC, LOGL_INFO, "Attaching UL TBF: %s\n", tbf_name((struct gprs_rlcmac_tbf *)tbf)); + LOGPMS(ms, DMS, LOGL_INFO, "Attaching UL TBF: %s\n", tbf_name((struct gprs_rlcmac_tbf *)tbf)); if (ms->ul_tbf) llist_add_tail(tbf_ms_list(ul_tbf_as_tbf(ms->ul_tbf)), &ms->old_tbfs); @@ -341,7 +341,7 @@ static void ms_attach_dl_tbf(struct GprsMs *ms, struct gprs_rlcmac_dl_tbf *tbf) { - LOGPMS(ms, DRLCMAC, LOGL_INFO, "Attaching DL TBF: %s\n", tbf_name((struct gprs_rlcmac_tbf *)tbf)); + LOGPMS(ms, DMS, LOGL_INFO, "Attaching DL TBF: %s\n", tbf_name((struct gprs_rlcmac_tbf *)tbf)); if (ms->dl_tbf) llist_add_tail(tbf_ms_list(dl_tbf_as_tbf(ms->dl_tbf)), &ms->old_tbfs); @@ -374,7 +374,7 @@ if (!ms_tbf_is_attached(ms, tbf)) return; - LOGPMS(ms, DRLCMAC, LOGL_INFO, "Detaching TBF: %s\n", + LOGPMS(ms, DMS, LOGL_INFO, "Detaching TBF: %s\n", tbf_name(tbf)); if (tbf == ul_tbf_as_tbf(ms->ul_tbf)) { @@ -394,7 +394,7 @@ ms_ref() taken to avoid use-after-free. */ void ms_reset(struct GprsMs *ms) { - LOGPMS(ms, DRLCMAC, LOGL_INFO, "Clearing MS object\n"); + LOGPMS(ms, DMS, LOGL_INFO, "Clearing MS object\n"); struct llist_item *pos; struct gprs_rlcmac_tbf *tbf; @@ -458,7 +458,7 @@ ms_name_buf(old_ms, old_ms_name, sizeof(old_ms_name)); - LOGPMS(ms, DRLCMAC, LOGL_INFO, "Merge MS: %s\n", old_ms_name); + LOGPMS(ms, DMS, LOGL_INFO, "Merge MS: %s\n", old_ms_name); if (strlen(ms_imsi(ms)) == 0 && strlen(ms_imsi(old_ms)) != 0) osmo_strlcpy(ms->imsi, ms_imsi(old_ms), sizeof(ms->imsi)); @@ -498,7 +498,7 @@ return; if (tlli != ms->new_dl_tlli) { - LOGP(DRLCMAC, LOGL_INFO, + LOGP(DMS, LOGL_INFO, "Modifying MS object, UL TLLI: 0x%08x -> 0x%08x, " "not yet confirmed\n", ms_tlli(ms), tlli); @@ -506,7 +506,7 @@ return; } - LOGP(DRLCMAC, LOGL_INFO, + LOGP(DMS, LOGL_INFO, "Modifying MS object, TLLI: 0x%08x -> 0x%08x, " "already confirmed partly\n", ms->tlli, tlli); @@ -524,7 +524,7 @@ /* The MS has not sent a message with the new TLLI, which may * happen according to the spec [TODO: add reference]. */ - LOGP(DRLCMAC, LOGL_INFO, + LOGP(DMS, LOGL_INFO, "The MS object cannot fully confirm an unexpected TLLI: 0x%08x, " "partly confirmed\n", tlli); /* Use the network's idea of TLLI as candidate, this does not @@ -533,7 +533,7 @@ return false; } - LOGP(DRLCMAC, LOGL_INFO, + LOGP(DMS, LOGL_INFO, "Modifying MS object, TLLI: 0x%08x confirmed\n", tlli); ms_apply_tlli_change(ms, tlli); @@ -544,12 +544,12 @@ void ms_set_imsi(struct GprsMs *ms, const char *imsi) { if (!imsi) { - LOGP(DRLCMAC, LOGL_ERROR, "Expected IMSI!\n"); + LOGP(DMS, LOGL_ERROR, "Expected IMSI!\n"); return; } if (imsi[0] && strlen(imsi) < 3) { - LOGP(DRLCMAC, LOGL_ERROR, "No valid IMSI '%s'!\n", + LOGP(DMS, LOGL_ERROR, "No valid IMSI '%s'!\n", imsi); return; } @@ -557,7 +557,7 @@ if (strcmp(imsi, ms->imsi) == 0) return; - LOGP(DRLCMAC, LOGL_INFO, + LOGP(DMS, LOGL_INFO, "Modifying MS object, TLLI = 0x%08x, IMSI '%s' -> '%s'\n", ms_tlli(ms), ms->imsi, imsi); @@ -570,7 +570,7 @@ * different IMSI */ OSMO_ASSERT(old_ms != ms); - LOGPMS(ms, DRLCMAC, LOGL_NOTICE, + LOGPMS(ms, DMS, LOGL_NOTICE, "IMSI '%s' was already assigned to another " "MS object: TLLI = 0x%08x, that IMSI will be removed\n", imsi, ms_tlli(old_ms)); @@ -595,12 +595,12 @@ return; if (gsm48_ta_is_valid(ta_)) { - LOGP(DRLCMAC, LOGL_INFO, + LOGP(DMS, LOGL_INFO, "Modifying MS object, TLLI = 0x%08x, TA %d -> %d\n", ms_tlli(ms), ms->ta, ta_); ms->ta = ta_; } else - LOGP(DRLCMAC, LOGL_NOTICE, + LOGP(DMS, LOGL_NOTICE, "MS object, TLLI = 0x%08x, invalid TA %d rejected (old " "value %d kept)\n", ms_tlli(ms), ta_, ms->ta); } @@ -610,7 +610,7 @@ if (ms_class_ == ms->ms_class) return; - LOGP(DRLCMAC, LOGL_INFO, + LOGP(DMS, LOGL_INFO, "Modifying MS object, TLLI = 0x%08x, MS class %d -> %d\n", ms_tlli(ms), ms->ms_class, ms_class_); @@ -622,14 +622,14 @@ if (ms_class_ == ms->egprs_ms_class) return; - LOGP(DRLCMAC, LOGL_INFO, + LOGP(DMS, LOGL_INFO, "Modifying MS object, TLLI = 0x%08x, EGPRS MS class %d -> %d\n", ms_tlli(ms), ms->egprs_ms_class, ms_class_); ms->egprs_ms_class = ms_class_; if (!bts_max_mcs_ul(ms->bts) || !bts_max_mcs_dl(ms->bts)) { - LOGPMS(ms, DRLCMAC, LOGL_DEBUG, + LOGPMS(ms, DMS, LOGL_DEBUG, "Avoid enabling EGPRS because use of MCS is disabled: ul=%u dl=%u\n", bts_max_mcs_ul(ms->bts), bts_max_mcs_dl(ms->bts)); return; @@ -643,7 +643,7 @@ } else { ms_set_mode(ms, EGPRS); } - LOGPMS(ms, DRLCMAC, LOGL_INFO, "Enabled EGPRS, mode %s\n", mode_name(ms_mode(ms))); + LOGPMS(ms, DMS, LOGL_INFO, "Enabled EGPRS, mode %s\n", mode_name(ms_mode(ms))); } void ms_update_error_rate(struct GprsMs *ms, struct gprs_rlcmac_tbf *tbf, int error_rate) @@ -882,7 +882,7 @@ } if (orig_cs != cs) - LOGPMS(ms, DRLCMACDL, LOGL_INFO, "MS (mode=%s) suggests transmitting " + LOGPMS(ms, DMS, LOGL_INFO, "MS (mode=%s) suggests transmitting " "DL %s, downgrade to %s in order to match TBF & scheduler requirements\n", mode_name(ms_mode(ms)), mcs_name(orig_cs), mcs_name(cs)); diff --git a/tests/app_info/AppInfoTest.cpp b/tests/app_info/AppInfoTest.cpp index cb11d0f..d33e8ce 100644 --- a/tests/app_info/AppInfoTest.cpp +++ b/tests/app_info/AppInfoTest.cpp @@ -180,7 +180,7 @@ log_set_print_filename2(osmo_stderr_target, LOG_FILENAME_NONE); log_set_print_category(osmo_stderr_target, 0); log_set_print_category_hex(osmo_stderr_target, 0); - log_parse_category_mask(osmo_stderr_target, "DL1IF,1:DRLCMAC,3:DRLCMACSCHED,1"); + log_parse_category_mask(osmo_stderr_target, "DL1IF,1:DRLCMAC,3:DRLCMACSCHED,1:DMS,3"); the_pcu = gprs_pcu_alloc(tall_pcu_ctx); bts_alloc(the_pcu, 0); diff --git a/tests/ms/MsTest.cpp b/tests/ms/MsTest.cpp index 7b7d59a..2a15a7b 100644 --- a/tests/ms/MsTest.cpp +++ b/tests/ms/MsTest.cpp @@ -542,7 +542,7 @@ log_set_log_level(osmo_stderr_target, LOGL_INFO); log_set_print_category(osmo_stderr_target, 0); log_set_print_category_hex(osmo_stderr_target, 0); - log_parse_category_mask(osmo_stderr_target, "DPCU,3:DRLCMAC,3"); + log_parse_category_mask(osmo_stderr_target, "DPCU,3:DRLCMAC,3:DMS,3"); the_pcu = gprs_pcu_alloc(tall_pcu_ctx); diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index 4adbaf8..ad08318 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -3470,7 +3470,7 @@ log_set_print_category_hex(osmo_stderr_target, 0); log_parse_category_mask(osmo_stderr_target, "DRLCMAC,1:DRLCMACDATA,3:DRLCMACDL,3:DRLCMACUL,3:" "DRLCMACSCHED,1:DRLCMACMEAS,3:DNS,3:DLBSSGP,3:DPCU,5:" - "DL1IF,6:DTBF,1:DTBFUL,1:DTBFDL,1:DLGLOBAL,2:"); + "DL1IF,6:DMS,1:DTBF,1:DTBFUL,1:DTBFDL,1:DLGLOBAL,2:"); osmo_fsm_log_addr(false); vty_init(&pcu_vty_info); pcu_vty_init(); diff --git a/tests/ulc/PdchUlcTest.cpp b/tests/ulc/PdchUlcTest.cpp index 3756b9d..be370bd 100644 --- a/tests/ulc/PdchUlcTest.cpp +++ b/tests/ulc/PdchUlcTest.cpp @@ -317,7 +317,7 @@ log_set_log_level(osmo_stderr_target, LOGL_DEBUG); log_set_print_category_hex(osmo_stderr_target, 0); log_set_print_category(osmo_stderr_target, 0); - log_parse_category_mask(osmo_stderr_target, "DPCU,1:DRLCMAC,1:DRLCMACUL,1"); + log_parse_category_mask(osmo_stderr_target, "DPCU,1:DRLCMAC,1:DRLCMACUL,1:DMS,1"); the_pcu = gprs_pcu_alloc(tall_pcu_ctx); -- To view, visit
https://gerrit.osmocom.org/c/osmo-pcu/+/32383
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ib4ce88d0f7309ac77c064a94bb0d667e8dbc33dd Gerrit-Change-Number: 32383 Gerrit-PatchSet: 7 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
2 years, 2 months
1
0
0
0
[S] Change in osmo-pcu[master]: meas: Improve logging formatting
by pespin
pespin has submitted this change. (
https://gerrit.osmocom.org/c/osmo-pcu/+/32389
) ( 3 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: meas: Improve logging formatting ...................................................................... meas: Improve logging formatting Change-Id: I15d66da3f41a9f14a542b96436d65a0581bbb45a --- M src/gprs_rlcmac_meas.cpp 1 file changed, 15 insertions(+), 7 deletions(-) Approvals: fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gprs_rlcmac_meas.cpp b/src/gprs_rlcmac_meas.cpp index d14f405..a3d891c 100644 --- a/src/gprs_rlcmac_meas.cpp +++ b/src/gprs_rlcmac_meas.cpp @@ -124,8 +124,8 @@ if (!sum) return -EINVAL; - LOGP(DRLCMACMEAS, LOGL_DEBUG, "DL Loss of TLLI 0x%08x: Received: %4d " - "Lost: %4d Sum: %4d\n", tbf->tlli(), received, lost, sum); + LOGP(DRLCMACMEAS, LOGL_DEBUG, "%s DL Loss: Received: %4d Lost: %4d Sum: %4d\n", + tbf_name(dl_tbf_as_tbf_const(tbf)), received, lost, sum); tbf->m_bw.dl_loss_received += received; tbf->m_bw.dl_loss_lost += lost; @@ -154,9 +154,8 @@ if (!sum) return -EINVAL; - LOGP(DRLCMACMEAS, LOGL_DEBUG, "DL packet loss of IMSI=%s / TLLI=0x%08x: " - "%d%%\n", tbf->imsi(), tbf->tlli(), - tbf->m_bw.dl_loss_lost * 100 / sum); + LOGP(DRLCMACMEAS, LOGL_DEBUG, "%s DL packet loss: %d%%\n", + tbf_name(dl_tbf_as_tbf_const(tbf)), tbf->m_bw.dl_loss_lost * 100 / sum); return 0; } @@ -179,8 +178,8 @@ return 0; tbf->m_bw.dl_throughput = (tbf->m_bw.dl_bw_octets << 10) / ((elapsed.tv_sec << 10) + (elapsed.tv_nsec >> 20)); - LOGP(DRLCMACMEAS, LOGL_INFO, "DL Bandwitdh of IMSI=%s / TLLI=0x%08x: " - "%d KBits/s\n", tbf->imsi(), tbf->tlli(), tbf->m_bw.dl_throughput); + LOGP(DRLCMACMEAS, LOGL_INFO, "%s DL Bandwitdh: %d KBits/s\n", + tbf_name(dl_tbf_as_tbf_const(tbf)), tbf->m_bw.dl_throughput); /* reset bandwidth values timestamp */ memcpy(bw_tv, &now_tv, sizeof(*bw_tv)); -- To view, visit
https://gerrit.osmocom.org/c/osmo-pcu/+/32389
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I15d66da3f41a9f14a542b96436d65a0581bbb45a Gerrit-Change-Number: 32389 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
2 years, 2 months
1
0
0
0
[S] Change in osmo-pcu[master]: ms: Increase log level when scheduling release timer
by pespin
pespin has submitted this change. (
https://gerrit.osmocom.org/c/osmo-pcu/+/32384
) ( 4 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: ms: Increase log level when scheduling release timer ...................................................................... ms: Increase log level when scheduling release timer Change-Id: Ie470b5b0c7b01d91f4ad693e52afd51860d6da2d --- M src/gprs_ms.c M tests/ms/MsTest.err 2 files changed, 11 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/src/gprs_ms.c b/src/gprs_ms.c index 1b51d4d..877422f 100644 --- a/src/gprs_ms.c +++ b/src/gprs_ms.c @@ -240,7 +240,7 @@ return; } - LOGPMS(ms, DMS, LOGL_DEBUG, "Schedule MS release in %u secs\n", ms->delay); + LOGPMS(ms, DMS, LOGL_INFO, "Schedule MS release in %u secs\n", ms->delay); osmo_timer_schedule(&ms->timer, ms->delay, 0); } diff --git a/tests/ms/MsTest.err b/tests/ms/MsTest.err index 84a948e..b507ca9 100644 --- a/tests/ms/MsTest.err +++ b/tests/ms/MsTest.err @@ -61,6 +61,7 @@ MS(TLLI-0xffeeddbb:TA-220:MSCLS-0-0:UL:DL) Detaching TBF: TBF(UL:STATE-NEW:GPRS:TLLI-0xffeeddbb) MS(TLLI-0xffeeddbb:TA-220:MSCLS-0-0:DL) Detaching TBF: TBF(DL:STATE-NEW:GPRS:TLLI-0xffeeddbb) MS(TLLI-0xffeeddbb:TA-220:MSCLS-0-0): - tbf: now used by 0 (-) +MS(TLLI-0xffeeddbb:TA-220:MSCLS-0-0) Schedule MS release in 1 secs MS(TLLI-0xffeeddbb:TA-220:MSCLS-0-0) Release timer expired MS(TLLI-0xffeeddbb:TA-220:MSCLS-0-0) Destroying MS object Creating MS object -- To view, visit
https://gerrit.osmocom.org/c/osmo-pcu/+/32384
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ie470b5b0c7b01d91f4ad693e52afd51860d6da2d Gerrit-Change-Number: 32384 Gerrit-PatchSet: 5 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
2 years, 2 months
1
0
0
0
[M] Change in osmo-pcu[master]: ms: Get rid of ms->delay field
by pespin
pespin has submitted this change. (
https://gerrit.osmocom.org/c/osmo-pcu/+/32390
) Change subject: ms: Get rid of ms->delay field ...................................................................... ms: Get rid of ms->delay field Simply apply the content of the configured timer when the MS goes idle. Having that field is convenient to do tricky stuff in unit tests, but makes the main osmo-pcu app more complex for no good enough reason. Change-Id: I8d44318b37b6605afd84db8ccec0d75e6db293b9 --- M src/bts.cpp M src/gprs_ms.c M src/gprs_ms.h M tests/alloc/AllocTest.cpp M tests/ms/MsTest.cpp M tests/tbf/TbfTest.cpp M tests/ulc/PdchUlcTest.cpp 7 files changed, 30 insertions(+), 24 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/src/bts.cpp b/src/bts.cpp index 4cbe68e..d4bb35f 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -241,11 +241,8 @@ static int bts_talloc_destructor(struct gprs_rlcmac_bts* bts) { struct GprsMs *ms; - while ((ms = llist_first_entry_or_null(&bts->ms_list, struct GprsMs, list))) { - ms_set_timeout(ms, 0); - bts_stat_item_dec(bts, STAT_MS_PRESENT); + while ((ms = llist_first_entry_or_null(&bts->ms_list, struct GprsMs, list))) talloc_free(ms); - } gprs_bssgp_destroy(bts); diff --git a/src/gprs_ms.c b/src/gprs_ms.c index 877422f..1450d19 100644 --- a/src/gprs_ms.c +++ b/src/gprs_ms.c @@ -170,8 +170,6 @@ if (!ms->ctrs) goto free_ret; - ms_set_timeout(ms, osmo_tdef_get(bts->pcu->T_defs, -2030, OSMO_TDEF_S, -1)); - if (use_ref) ms_ref(ms, use_ref); return ms; @@ -219,6 +217,8 @@ /* MS has no attached TBFs anymore. */ static void ms_becomes_idle(struct GprsMs *ms) { + unsigned long delay_rel_sec = osmo_tdef_get(ms->bts->pcu->T_defs, -2030, OSMO_TDEF_S, -1); + ms_set_reserved_slots(ms, NULL, 0, 0); ms->first_common_ts = NULL; @@ -226,7 +226,7 @@ * Skip delaying free() through release timer if delay is configured to be 0. * This is useful for synced freed during unit tests. */ - if (ms->delay == 0) { + if (delay_rel_sec == 0) { talloc_free(ms); return; } @@ -240,8 +240,8 @@ return; } - LOGPMS(ms, DMS, LOGL_INFO, "Schedule MS release in %u secs\n", ms->delay); - osmo_timer_schedule(&ms->timer, ms->delay, 0); + LOGPMS(ms, DMS, LOGL_INFO, "Schedule MS release in %lu secs\n", delay_rel_sec); + osmo_timer_schedule(&ms->timer, delay_rel_sec, 0); } static void ms_becomes_active(struct GprsMs *ms) @@ -398,9 +398,6 @@ struct llist_item *pos; struct gprs_rlcmac_tbf *tbf; - /* free immediately when it becomes idle: */ - ms->delay = 0; - tbf = ul_tbf_as_tbf(ms_ul_tbf(ms)); if (tbf && !tbf_timers_pending(tbf, T_MAX)) tbf_free(tbf); @@ -415,7 +412,8 @@ } /* Flag it with invalid data so that it cannot be looked up anymore and - * shows up specially if listed in VTY: */ + * shows up specially if listed in VTY. Furthermore, it will also trigger + * immediate free() when it becomes idle: */ ms->tlli = GSM_RESERVED_TMSI; ms->new_dl_tlli = ms->tlli; ms->new_ul_tlli = ms->tlli; diff --git a/src/gprs_ms.h b/src/gprs_ms.h index 03508ff..4f6456e 100644 --- a/src/gprs_ms.h +++ b/src/gprs_ms.h @@ -80,7 +80,6 @@ struct osmo_use_count use_count; struct osmo_timer_list timer; - unsigned delay; int64_t last_cs_not_low; @@ -216,11 +215,6 @@ return ms->mode; } -static inline void ms_set_timeout(struct GprsMs *ms, unsigned secs) -{ - ms->delay = secs; -} - static inline unsigned ms_nack_rate_dl(const struct GprsMs *ms) { return ms->nack_rate_dl; diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp index 8a67152..a84bd64 100644 --- a/tests/alloc/AllocTest.cpp +++ b/tests/alloc/AllocTest.cpp @@ -225,7 +225,7 @@ ms = ms_alloc(bts, __func__); ms_set_ms_class(ms, ms_class); /* Avoid delaying free to avoid tons of to-be-freed ms objects queuing */ - ms_set_timeout(ms, 0); + OSMO_ASSERT(osmo_tdef_set(the_pcu->T_defs, -2030, 0, OSMO_TDEF_S) == 0); ul_tbf = ul_tbf_alloc(bts, ms, -1, true); if (!ul_tbf) { ms_unref(ms, __func__); @@ -273,7 +273,7 @@ ms = ms_alloc(bts, __func__); ms_set_ms_class(ms, ms_class); /* Avoid delaying free to avoid tons of to-be-freed ms objects queuing */ - ms_set_timeout(ms, 0); + OSMO_ASSERT(osmo_tdef_set(the_pcu->T_defs, -2030, 0, OSMO_TDEF_S) == 0); dl_tbf = dl_tbf_alloc(bts, ms, -1, true); if (!dl_tbf) { ms_unref(ms, __func__); @@ -329,7 +329,7 @@ ms = ms_alloc(bts, __func__); ms_set_ms_class(ms, ms_class); /* Avoid delaying free to avoid tons of to-be-freed ms objects queuing */ - ms_set_timeout(ms, 0); + OSMO_ASSERT(osmo_tdef_set(the_pcu->T_defs, -2030, 0, OSMO_TDEF_S) == 0); ul_tbf = ul_tbf_alloc(bts, ms, -1, false); if (!ul_tbf) { ms_unref(ms, __func__); diff --git a/tests/ms/MsTest.cpp b/tests/ms/MsTest.cpp index 2a15a7b..776f77c7 100644 --- a/tests/ms/MsTest.cpp +++ b/tests/ms/MsTest.cpp @@ -378,9 +378,10 @@ printf("=== start %s ===\n", __func__); + OSMO_ASSERT(osmo_tdef_set(the_pcu->T_defs, -2030, 1, OSMO_TDEF_S) == 0); + ms = ms_alloc(bts, __func__); ms_set_tlli(ms, tlli); - ms_set_timeout(ms, 1); OSMO_ASSERT(ms_is_idle(ms)); @@ -415,6 +416,8 @@ talloc_free(ul_tbf); talloc_free(bts); printf("=== end %s ===\n", __func__); + /* Return the timer to the usually expected value 0 for other tests: */ + OSMO_ASSERT(osmo_tdef_set(the_pcu->T_defs, -2030, 0, OSMO_TDEF_S) == 0); } static void test_ms_cs_selection() diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index ad08318..76394e2 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -627,7 +627,7 @@ fprintf(stderr, "=== end %s ===\n", __func__); /* Restore MS release timeout to 0 to make sure it is freed immediately: */ - ms_set_timeout(ms, 0); + OSMO_ASSERT(osmo_tdef_set(the_pcu->T_defs, -2030, 0, OSMO_TDEF_S) == 0); TALLOC_FREE(the_pcu); } diff --git a/tests/ulc/PdchUlcTest.cpp b/tests/ulc/PdchUlcTest.cpp index be370bd..a13479f 100644 --- a/tests/ulc/PdchUlcTest.cpp +++ b/tests/ulc/PdchUlcTest.cpp @@ -320,6 +320,7 @@ log_parse_category_mask(osmo_stderr_target, "DPCU,1:DRLCMAC,1:DRLCMACUL,1:DMS,1"); the_pcu = gprs_pcu_alloc(tall_pcu_ctx); + OSMO_ASSERT(osmo_tdef_set(the_pcu->T_defs, -2030, 0, OSMO_TDEF_S) == 0); test_reserve_multiple(); test_fn_wrap_around(); -- To view, visit
https://gerrit.osmocom.org/c/osmo-pcu/+/32390
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I8d44318b37b6605afd84db8ccec0d75e6db293b9 Gerrit-Change-Number: 32390 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
2 years, 2 months
1
0
0
0
[S] Change in osmo-pcu[master]: ms: Log MS active/idle state in 'show ms' VTY commands
by pespin
pespin has submitted this change. (
https://gerrit.osmocom.org/c/osmo-pcu/+/32394
) Change subject: ms: Log MS active/idle state in 'show ms' VTY commands ...................................................................... ms: Log MS active/idle state in 'show ms' VTY commands Change-Id: Ibcd34055c9ae390510c5c3ba26621fd96d2368fd --- M src/gprs_ms.c M src/gprs_ms.h M src/pcu_vty_functions.cpp 3 files changed, 24 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/src/gprs_ms.c b/src/gprs_ms.c index 720617e..0018252 100644 --- a/src/gprs_ms.c +++ b/src/gprs_ms.c @@ -219,6 +219,8 @@ { unsigned long delay_rel_sec = osmo_tdef_get(ms->bts->pcu->T_defs, -2030, OSMO_TDEF_S, -1); + osmo_gettimeofday(&ms->tv_idle_start, NULL); + ms_set_reserved_slots(ms, NULL, 0, 0); ms->first_common_ts = NULL; @@ -251,6 +253,7 @@ LOGPMS(ms, DMS, LOGL_DEBUG, "Cancel scheduled MS release\n"); + timerclear(&ms->tv_idle_start); osmo_timer_del(&ms->release_timer); } diff --git a/src/gprs_ms.h b/src/gprs_ms.h index b2b3274..ef1cc4e 100644 --- a/src/gprs_ms.h +++ b/src/gprs_ms.h @@ -80,6 +80,8 @@ struct osmo_use_count use_count; struct osmo_timer_list release_timer; + /* Time at which MS became idle and waiting to be released by release_timer: */ + struct timeval tv_idle_start; int64_t last_cs_not_low; diff --git a/src/pcu_vty_functions.cpp b/src/pcu_vty_functions.cpp index fe51203..b7fcc8f 100644 --- a/src/pcu_vty_functions.cpp +++ b/src/pcu_vty_functions.cpp @@ -148,6 +148,16 @@ uint8_t slots; vty_out(vty, "MS TLLI=%08x, IMSI=%s%s", ms_tlli(ms), ms_imsi(ms), VTY_NEWLINE); + if (osmo_timer_pending(&ms->release_timer)) { + struct timeval tv_now, tv_res1, tv_res2; + osmo_gettimeofday(&tv_now, NULL); + timersub(&tv_now, &ms->tv_idle_start, &tv_res1); + osmo_timer_remaining(&ms->release_timer, &tv_now, &tv_res2); + vty_out(vty, " State: IDLE for %lus, release in %lus%s", + tv_res1.tv_sec, tv_res2.tv_sec, VTY_NEWLINE); + } else { + vty_out(vty, " State: ACTIVE%s", VTY_NEWLINE); + } vty_out(vty, " Timing advance (TA): %d%s", ms_ta(ms), VTY_NEWLINE); vty_out(vty, " Coding scheme uplink: %s%s", mcs_name(ms_current_cs_ul(ms)), VTY_NEWLINE); -- To view, visit
https://gerrit.osmocom.org/c/osmo-pcu/+/32394
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ibcd34055c9ae390510c5c3ba26621fd96d2368fd Gerrit-Change-Number: 32394 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
2 years, 2 months
1
0
0
0
[S] Change in osmo-pcu[master]: ms: Rename field timer -> release_timer
by pespin
pespin has submitted this change. (
https://gerrit.osmocom.org/c/osmo-pcu/+/32391
) ( 2 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: ms: Rename field timer -> release_timer ...................................................................... ms: Rename field timer -> release_timer Rename it so that it becomes clear what the timer is used for. Change-Id: Id4738ea196b232858e1ec9cdc439f9b81839058f --- M src/gprs_ms.c M src/gprs_ms.h M tests/ms/MsTest.cpp 3 files changed, 18 insertions(+), 7 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/src/gprs_ms.c b/src/gprs_ms.c index 1450d19..720617e 100644 --- a/src/gprs_ms.c +++ b/src/gprs_ms.c @@ -151,7 +151,7 @@ LOGP(DMS, LOGL_INFO, "Creating MS object\n"); ms->imsi[0] = '\0'; - osmo_timer_setup(&ms->timer, ms_release_timer_cb, ms); + osmo_timer_setup(&ms->release_timer, ms_release_timer_cb, ms); llc_queue_init(&ms->llc_queue, ms); memset(&ms->llc_timer, 0, sizeof(ms->llc_timer)); osmo_timer_setup(&ms->llc_timer, ms_llc_timer_cb, ms); @@ -189,7 +189,7 @@ ms_set_reserved_slots(ms, NULL, 0, 0); - osmo_timer_del(&ms->timer); + osmo_timer_del(&ms->release_timer); if (ms->ul_tbf) { tbf_set_ms(ul_tbf_as_tbf(ms->ul_tbf), NULL); @@ -241,17 +241,17 @@ } LOGPMS(ms, DMS, LOGL_INFO, "Schedule MS release in %lu secs\n", delay_rel_sec); - osmo_timer_schedule(&ms->timer, delay_rel_sec, 0); + osmo_timer_schedule(&ms->release_timer, delay_rel_sec, 0); } static void ms_becomes_active(struct GprsMs *ms) { - if (!osmo_timer_pending(&ms->timer)) + if (!osmo_timer_pending(&ms->release_timer)) return; LOGPMS(ms, DMS, LOGL_DEBUG, "Cancel scheduled MS release\n"); - osmo_timer_del(&ms->timer); + osmo_timer_del(&ms->release_timer); } void ms_set_mode(struct GprsMs *ms, enum mcs_kind mode) diff --git a/src/gprs_ms.h b/src/gprs_ms.h index 4f6456e..b2b3274 100644 --- a/src/gprs_ms.h +++ b/src/gprs_ms.h @@ -79,7 +79,7 @@ struct osmo_timer_list llc_timer; struct osmo_use_count use_count; - struct osmo_timer_list timer; + struct osmo_timer_list release_timer; int64_t last_cs_not_low; diff --git a/tests/ms/MsTest.cpp b/tests/ms/MsTest.cpp index 776f77c7..ea54a12 100644 --- a/tests/ms/MsTest.cpp +++ b/tests/ms/MsTest.cpp @@ -404,7 +404,7 @@ /* test MS still exists and it's idle: */ OSMO_ASSERT(bts_get_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI) != NULL); OSMO_ASSERT(ms_is_idle(ms)); - OSMO_ASSERT(osmo_timer_pending(&ms->timer)); + OSMO_ASSERT(osmo_timer_pending(&ms->release_timer)); usleep(1100000); osmo_timers_update(); -- To view, visit
https://gerrit.osmocom.org/c/osmo-pcu/+/32391
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Id4738ea196b232858e1ec9cdc439f9b81839058f Gerrit-Change-Number: 32391 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
2 years, 2 months
1
0
0
0
[S] Change in osmo-pcu[master]: tbf: Move m_ctrs alloc to constructor
by pespin
pespin has submitted this change. (
https://gerrit.osmocom.org/c/osmo-pcu/+/32377
) Change subject: tbf: Move m_ctrs alloc to constructor ...................................................................... tbf: Move m_ctrs alloc to constructor Move rate_ctr allocation to the constructor since it's expected not to fail. This simplifies further tbf::setup() function. Change-Id: If64443c38624d159e68eec3a07d8e8caf369467b --- M src/tbf.cpp M src/tbf_ul.cpp 2 files changed, 16 insertions(+), 8 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/tbf.cpp b/src/tbf.cpp index 797a95d..2f832a5 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -129,6 +129,9 @@ m_created_ts = time(NULL); /* set timestamp */ osmo_clock_gettime(CLOCK_MONOTONIC, &meas.rssi_tv); + + m_ctrs = rate_ctr_group_alloc(this, &tbf_ctrg_desc, next_tbf_ctr_group_id++); + OSMO_ASSERT(m_ctrs); } @@ -592,12 +595,6 @@ "Allocated: trx = %d, ul_slots = %02x, dl_slots = %02x\n", this->trx->trx_no, ul_slots(), dl_slots()); - m_ctrs = rate_ctr_group_alloc(this, &tbf_ctrg_desc, next_tbf_ctr_group_id++); - if (!m_ctrs) { - LOGPTBF(this, LOGL_ERROR, "Couldn't allocate TBF counters\n"); - return -1; - } - tbf_update_state_fsm_name(this); ms_attach_tbf(m_ms, this); diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index a0e0398..608714d 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -168,14 +168,13 @@ /* The only one TS is the common, control TS */ ms_set_first_common_ts(ms, pdch); tbf_assign_control_ts(ul_tbf); - ul_tbf->m_ctrs = rate_ctr_group_alloc(ul_tbf, &tbf_ctrg_desc, next_tbf_ctr_group_id++); ul_tbf->m_ul_egprs_ctrs = rate_ctr_group_alloc(ul_tbf, &tbf_ul_egprs_ctrg_desc, ul_tbf->m_ctrs->idx); ul_tbf->m_ul_gprs_ctrs = rate_ctr_group_alloc(ul_tbf, &tbf_ul_gprs_ctrg_desc, ul_tbf->m_ctrs->idx); - if (!ul_tbf->m_ctrs || !ul_tbf->m_ul_egprs_ctrs || !ul_tbf->m_ul_gprs_ctrs) { + if (!ul_tbf->m_ul_egprs_ctrs || !ul_tbf->m_ul_gprs_ctrs) { LOGPTBF(ul_tbf, LOGL_ERROR, "Could not allocate TBF UL rate counters\n"); talloc_free(ul_tbf); return NULL; -- To view, visit
https://gerrit.osmocom.org/c/osmo-pcu/+/32377
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: If64443c38624d159e68eec3a07d8e8caf369467b Gerrit-Change-Number: 32377 Gerrit-PatchSet: 7 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
2 years, 2 months
1
0
0
0
← Newer
1
...
103
104
105
106
107
108
109
...
226
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
Results per page:
10
25
50
100
200