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]: paging: Replace reqs waiting for retransmission with new incoming ini...
by pespin 29 Nov '22

29 Nov '22
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bsc/+/30347 to look at the new patch set (#4). Change subject: paging: Replace reqs waiting for retransmission with new incoming inital req if queue is full ...................................................................... paging: Replace reqs waiting for retransmission with new incoming inital req if queue is full If queue size (in transmit delay of requests) is too long (above threshold) when a new initial incoming request arrives, instead of directly discarding it, see if we can drop a pending retransmission and insert the new one instead, in order to avoid losing initial requests. This is done under the assumption that it is more important to transmit intial requests than to retransmit already transmitted ones. The rationale is that there's lower chances that an MS which didn't answer lately will answer now (aka being reachable at the cell), so it's better to allocate resources for new requests (new MS) which may be available in the cell. Change-Id: Idfd93254ae456b1ee08416e05479488299dd063d Related: OS#5552 --- M src/osmo-bsc/paging.c 1 file changed, 14 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/47/30347/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/30347 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Idfd93254ae456b1ee08416e05479488299dd063d Gerrit-Change-Number: 30347 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmo-bsc[master]: paging: Optimize retrieving number of request per paging group
by pespin 29 Nov '22

29 Nov '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/30370 ) Change subject: paging: Optimize retrieving number of request per paging group ...................................................................... paging: Optimize retrieving number of request per paging group This patch caches the counts of initial paging requests for each paging group. This count is needed to estimate T3113 when a new incoming paging request is received and it has to be inserted into the queue. With this there's no need to traverse the whole initial_req_list every time a new incoming paging request is receiving, potentially saving lots of iteration and hence lots of CPU when the queue is long. Related: SYS#6200 Change-Id: I6994127827d120a0b4dd3de51e1ddde39f2fe531 --- M include/osmocom/bsc/paging.h M src/osmo-bsc/paging.c 2 files changed, 17 insertions(+), 20 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/70/30370/1 diff --git a/include/osmocom/bsc/paging.h b/include/osmocom/bsc/paging.h index b10c398..15eb49e 100644 --- a/include/osmocom/bsc/paging.h +++ b/include/osmocom/bsc/paging.h @@ -61,6 +61,9 @@ */ #define PAGING_THRESHOLD_X3113_DEFAULT_SEC 60 +#define MAX_PAGING_BLOCKS_CCCH 9 +#define MAX_BS_PA_MFRMS 9 + struct bsc_paging_params { enum bsc_paging_reason reason; struct bsc_msc_data *msc; @@ -117,6 +120,9 @@ /* Number of requests in pending_requests_len */ unsigned int retrans_req_list_len; + /* Number of requests in initial_req_list, indexed by pgroup. */ + unsigned int initial_req_pgroup_counts[MAX_PAGING_BLOCKS_CCCH * MAX_BS_PA_MFRMS]; + struct gsm_bts *bts; struct osmo_timer_list work_timer; diff --git a/src/osmo-bsc/paging.c b/src/osmo-bsc/paging.c index 627d7b6..8a6195c 100644 --- a/src/osmo-bsc/paging.c +++ b/src/osmo-bsc/paging.c @@ -88,10 +88,12 @@ osmo_timer_del(&req->T3113); llist_del(&req->entry); - if (req->attempts == 0) + if (req->attempts == 0) { bts_pag_st->initial_req_list_len--; - else + bts_pag_st->initial_req_pgroup_counts[req->pgroup]--; + } else { bts_pag_st->retrans_req_list_len--; + } osmo_stat_item_dec(osmo_stat_item_group_get_item(bts->bts_statg, BTS_STAT_PAGING_REQ_QUEUE_LENGTH), 1); bsc_subscr_remove_active_paging_request(req->bsub, req); talloc_free(req); @@ -261,6 +263,7 @@ num_paged++; /* Since request was removed from initial_req_list and inserted into retrans_req_list, update list lengths: */ bts_pag_st->initial_req_list_len--; + bts_pag_st->initial_req_pgroup_counts[request->pgroup]--; bts_pag_st->retrans_req_list_len++; } @@ -498,9 +501,8 @@ struct gsm_paging_request *req; unsigned int t3113_timeout_s; unsigned int x3113_s = osmo_tdef_get(bts->network->T_defs, -3113, OSMO_TDEF_S, -1); - unsigned int reqs_before = 0, reqs_before_same_pgroup = 0; - uint8_t pgroup = gsm0502_calc_paging_group(&bts->si_common.chan_desc, - str_to_imsi(params->bsub->imsi)); + uint8_t pgroup; + unsigned int reqs_before, reqs_before_same_pgroup; rate_ctr_inc(rate_ctr_group_get_ctr(bts->bts_ctrs, BTS_CTR_PAGING_ATTEMPTED)); @@ -525,21 +527,9 @@ paging_remove_request(first_retrans_req); } - /* The incoming new req will be stored in initial_req_list giving higher prio - * to it over retransmissions. This avoids new subscribers being paged to - * be delayed if the paging queue is full due to a lot of retranmissions. - * Retranmissions usually mean MS are not reachable/available, so the - * rationale here is to prioritize new subs which may be available. - * - * Count initial reqs already stored in initial_req_list, since those - * will be scheduled for transmission before current incoming req and - need to be taken into account when calculating T3113 for it. - */ - llist_for_each_entry(req, &bts_entry->initial_req_list, entry) { - reqs_before++; - if (req->pgroup == pgroup) - reqs_before_same_pgroup++; - } + pgroup = gsm0502_calc_paging_group(&bts->si_common.chan_desc, str_to_imsi(params->bsub->imsi)); + reqs_before = bts_entry->initial_req_list_len; + reqs_before_same_pgroup = bts_entry->initial_req_pgroup_counts[pgroup]; LOG_PAGING_BTS(params, bts, DPAG, LOGL_DEBUG, "Start paging\n"); req = talloc_zero(tall_paging_ctx, struct gsm_paging_request); @@ -554,6 +544,7 @@ bsc_subscr_add_active_paging_request(req->bsub, req); bts_entry->initial_req_list_len++; + bts_entry->initial_req_pgroup_counts[req->pgroup]++; osmo_stat_item_inc(osmo_stat_item_group_get_item(bts->bts_statg, BTS_STAT_PAGING_REQ_QUEUE_LENGTH), 1); llist_add_tail(&req->entry, &bts_entry->initial_req_list); -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/30370 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I6994127827d120a0b4dd3de51e1ddde39f2fe531 Gerrit-Change-Number: 30370 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-bsc[master]: vty: Fix lost 'no timer-dynamic T3113' config when writing current co...
by pespin 29 Nov '22

29 Nov '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/30344 ) Change subject: vty: Fix lost 'no timer-dynamic T3113' config when writing current config ...................................................................... vty: Fix lost 'no timer-dynamic T3113' config when writing current config The default is to have a dynamic T3113. However, if the user wished to set it statically, it would show up when writing the current VTY config. Change-Id: If121a97bbb4a0234a0c162ef37c3692d6408404d --- M src/osmo-bsc/bts_vty.c 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/bts_vty.c b/src/osmo-bsc/bts_vty.c index e01d9b8..50e49b8 100644 --- a/src/osmo-bsc/bts_vty.c +++ b/src/osmo-bsc/bts_vty.c @@ -3033,7 +3033,7 @@ #define TNUM_STR "T-number, optionally preceded by 't' or 'T'\n" DEFUN_ATTR(cfg_bts_t3113_dynamic, cfg_bts_t3113_dynamic_cmd, "timer-dynamic TNNNN", - "Calculate T3113 dynamically based on channel config and load\n" + "Calculate T3113 dynamically based on channel config and load (default)\n" TNUM_STR, CMD_ATTR_IMMEDIATE) { @@ -4516,6 +4516,8 @@ /* if we have a limit, write it */ if (bts->paging.free_chans_need >= 0) vty_out(vty, " paging free %d%s", bts->paging.free_chans_need, VTY_NEWLINE); + if (!bts->T3113_dynamic) + vty_out(vty, " no timer-dynamic T3113%s", VTY_NEWLINE); vty_out(vty, " neighbor-list mode %s%s", get_value_string(bts_neigh_mode_strs, bts->neigh_list_manual_mode), VTY_NEWLINE); -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/30344 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: If121a97bbb4a0234a0c162ef37c3692d6408404d Gerrit-Change-Number: 30344 Gerrit-PatchSet: 2 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: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-bsc[master]: paging: Introduce VTY configurable X3113 (Maximum Paging Request Tran...
by pespin 29 Nov '22

29 Nov '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/30345 ) Change subject: paging: Introduce VTY configurable X3113 (Maximum Paging Request Transmit Delay Threshold) ...................................................................... paging: Introduce VTY configurable X3113 (Maximum Paging Request Transmit Delay Threshold) This allows configuring the maximum delay of paging requests to be queued according to other parameters, such as MSC paging request timeouts, etc. Related: OS#5552 Change-Id: Ia556ef4e474e6a2d0d1618bab680a3330a3c062b --- M include/osmocom/bsc/paging.h M src/osmo-bsc/net_init.c M src/osmo-bsc/paging.c M tests/timer.vty 4 files changed, 25 insertions(+), 9 deletions(-) Approvals: Jenkins Builder: Verified neels: Looks good to me, but someone else must approve laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/include/osmocom/bsc/paging.h b/include/osmocom/bsc/paging.h index 720ee1c..dd1bb9e 100644 --- a/include/osmocom/bsc/paging.h +++ b/include/osmocom/bsc/paging.h @@ -53,6 +53,14 @@ BSC_PAGING_FOR_LCS = 0x2, }; +/* OS#5552, OS#5553: Maximum allowed scheduling transmit delay in paging + * requests to be queued, in seconds. If calculated delay for requests to be + * queued goes over this threshold, they are discarded instead of inserted to + * the queue. This avoids keeping queueing requests which will be scheduled for + * transmission too late. + */ +#define PAGING_THRESHOLD_X3113_DEFAULT_SEC 60 + struct bsc_paging_params { enum bsc_paging_reason reason; struct bsc_msc_data *msc; diff --git a/src/osmo-bsc/net_init.c b/src/osmo-bsc/net_init.c index ad2f9bf..75dcbf3 100644 --- a/src/osmo-bsc/net_init.c +++ b/src/osmo-bsc/net_init.c @@ -26,6 +26,7 @@ #include <osmocom/bsc/chan_alloc.h> #include <osmocom/bsc/neighbor_ident.h> #include <osmocom/bsc/bts_setup_ramp.h> +#include <osmocom/bsc/paging.h> static struct osmo_tdef gsm_network_T_defs[] = { { .T = 4, .default_val = 5, .desc = "Timeout to receive BSSMAP RESET ACKNOWLEDGE from the MSC" }, @@ -74,6 +75,11 @@ " 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 = -3113, .default_val = PAGING_THRESHOLD_X3113_DEFAULT_SEC, + .desc = "Maximum Paging Request Transmit Delay Threshold: " \ + "If the estimated transmit delay of the messages of the paging queue surpasses this threshold, new incoming " + "paging requests are discarded, hence limiting the size of the queue and maximum delay of its scheduled requests. " + "X3113 also serves as the upper boundary for dynamic T3113 when estimating the expected maximum delay to get a response" }, { .T = -3210, .default_val = 20, .desc = "After L3 Complete, wait for MSC to confirm" }, {} }; diff --git a/src/osmo-bsc/paging.c b/src/osmo-bsc/paging.c index 0395c14..a3f4e84 100644 --- a/src/osmo-bsc/paging.c +++ b/src/osmo-bsc/paging.c @@ -61,8 +61,6 @@ /* How many paging requests to Tx on RSL at max before going back to main loop */ #define MAX_PAGE_REQ_PER_ITER 10 -#define MAX_TX_DELAY_TIME_SEC 60 - /* How often to attempt sending new paging requests (initial, not retrans): 250ms */ static const struct timespec initial_period = { .tv_sec = 0, @@ -355,7 +353,7 @@ unsigned int num_reqs_same_pgroup); static unsigned int calculate_timer_3113(struct gsm_paging_request *req, unsigned int reqs_before, - unsigned int reqs_before_same_pgroup) + unsigned int reqs_before_same_pgroup, unsigned int max_dynamic_value) { unsigned int to_us, estimated_to, to; struct gsm_bts *bts = req->bts; @@ -389,9 +387,9 @@ /* ceiling in seconds + extra time */ estimated_to = (to_us + 999999) / 1000000 + d->val; - /* upper bound: 60s (OS#5553) */ - if (estimated_to > MAX_TX_DELAY_TIME_SEC) - to = MAX_TX_DELAY_TIME_SEC; + /* upper bound: see X3113, PAGING_THRESHOLD_X3113_DEFAULT_SEC */ + if (estimated_to > max_dynamic_value) + to = max_dynamic_value; else to = estimated_to; @@ -414,14 +412,16 @@ struct gsm_bts_paging_state *bts_entry = &bts->paging; struct gsm_paging_request *req, *last_initial_req = NULL; unsigned int t3113_timeout_s; + unsigned int x3113_s = osmo_tdef_get(bts->network->T_defs, -3113, OSMO_TDEF_S, -1); unsigned int reqs_before = 0, reqs_before_same_pgroup = 0; uint8_t pgroup = gsm0502_calc_paging_group(&bts->si_common.chan_desc, str_to_imsi(params->bsub->imsi)); rate_ctr_inc(rate_ctr_group_get_ctr(bts->bts_ctrs, BTS_CTR_PAGING_ATTEMPTED)); - /* don't try to queue more requests than we can realistically handle within MAX_TX_DELAY_TIME_SEC seconds */ - if (paging_pending_requests_nr(bts) > paging_estimate_available_slots(bts, MAX_TX_DELAY_TIME_SEC)) { + /* Don't try to queue more requests than we can realistically handle within X3113 seconds, + * see PAGING_THRESHOLD_X3113_DEFAULT_SEC. */ + if (paging_pending_requests_nr(bts) > paging_estimate_available_slots(bts, x3113_s)) { rate_ctr_inc(rate_ctr_group_get_ctr(bts->bts_ctrs, BTS_CTR_PAGING_OVERLOAD)); return -ENOSPC; } @@ -484,7 +484,7 @@ else/* Add in the middle of the list after last_initial_req */ __llist_add(&req->entry, &last_initial_req->entry, last_initial_req->entry.next); - t3113_timeout_s = calculate_timer_3113(req, reqs_before, reqs_before_same_pgroup); + t3113_timeout_s = calculate_timer_3113(req, reqs_before, reqs_before_same_pgroup, x3113_s); osmo_timer_schedule(&req->T3113, t3113_timeout_s, 0); /* Trigger scheduler if needed: */ diff --git a/tests/timer.vty b/tests/timer.vty index 04c9872..731d134 100644 --- a/tests/timer.vty +++ b/tests/timer.vty @@ -35,6 +35,7 @@ net: X18 = 60000 ms 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. (default: 60000 ms) net: X25 = 5 s Timeout for initial user data after an MSC initiated an SCCP connection to the BSS (default: 5 s) net: X3111 = 4 s Wait time after lchan was released in error (should be T3111 + 2s) (default: 4 s) +net: X3113 = 60 s Maximum Paging Request Transmit Delay Threshold: If the estimated transmit delay of the messages of the paging queue surpasses this threshold, new incoming paging requests are discarded, hence limiting the size of the queue and maximum delay of its scheduled requests. X3113 also serves as the upper boundary for dynamic T3113 when estimating the expected maximum delay to get a response (default: 60 s) net: X3210 = 20 s After L3 Complete, wait for MSC to confirm (default: 20 s) mgw: X2427 = 5 s timeout for MGCP response from MGW (default: 5 s) @@ -89,6 +90,7 @@ net: X18 = 60000 ms 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. (default: 60000 ms) net: X25 = 5 s Timeout for initial user data after an MSC initiated an SCCP connection to the BSS (default: 5 s) net: X3111 = 4 s Wait time after lchan was released in error (should be T3111 + 2s) (default: 4 s) +net: X3113 = 60 s Maximum Paging Request Transmit Delay Threshold: If the estimated transmit delay of the messages of the paging queue surpasses this threshold, new incoming paging requests are discarded, hence limiting the size of the queue and maximum delay of its scheduled requests. X3113 also serves as the upper boundary for dynamic T3113 when estimating the expected maximum delay to get a response (default: 60 s) net: X3210 = 20 s After L3 Complete, wait for MSC to confirm (default: 20 s) mgw: X2427 = 5 s timeout for MGCP response from MGW (default: 5 s) -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/30345 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ia556ef4e474e6a2d0d1618bab680a3330a3c062b Gerrit-Change-Number: 30345 Gerrit-PatchSet: 2 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: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-bsc[master]: paging: Introduce VTY configurable X3113 (Maximum Paging Request Tran...
by pespin 29 Nov '22

29 Nov '22
Attention is currently required from: neels, fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/30345 ) Change subject: paging: Introduce VTY configurable X3113 (Maximum Paging Request Transmit Delay Threshold) ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/30345 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ia556ef4e474e6a2d0d1618bab680a3330a3c062b Gerrit-Change-Number: 30345 Gerrit-PatchSet: 2 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: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Tue, 29 Nov 2022 11:34:27 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmocom-bb[master]: trxcon: implement Ready-to-Send PHYIF API
by fixeria 29 Nov '22

29 Nov '22
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30241 ) Change subject: trxcon: implement Ready-to-Send PHYIF API ...................................................................... trxcon: implement Ready-to-Send PHYIF API This API is going to be used by osmo-trx-ms for pulling Uplink bursts from the scheduler in a synchronous way, without relying on the timer driven libtrxcon's internal scheduler. Change-Id: Ic8f74413f5fad277340e007dd4296f890155a2c1 Related: OS#5599 --- M src/host/trxcon/include/osmocom/bb/trxcon/phyif.h M src/host/trxcon/src/trxcon_shim.c 2 files changed, 21 insertions(+), 1 deletion(-) Approvals: fixeria: Looks good to me, approved pespin: Looks good to me, but someone else must approve Hoernchen: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h b/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h index a2bc9ce..ac23ac6 100644 --- a/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h +++ b/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h @@ -69,6 +69,12 @@ } param; }; +/* RTS.ind - Ready-to-Send indication */ +struct trxcon_phyif_rts_ind { + uint32_t fn; + uint8_t tn; +}; + /* BURST.req - a burst to be transmitted */ struct trxcon_phyif_burst_req { uint32_t fn; @@ -88,11 +94,12 @@ unsigned int burst_len; }; - int trxcon_phyif_handle_burst_req(void *phyif, const struct trxcon_phyif_burst_req *br); int trxcon_phyif_handle_burst_ind(void *priv, const struct trxcon_phyif_burst_ind *bi); int trxcon_phyif_handle_clock_ind(void *priv, uint32_t fn); +int trxcon_phyif_handle_rts_ind(void *priv, const struct trxcon_phyif_rts_ind *rts); + int trxcon_phyif_handle_cmd(void *phyif, const struct trxcon_phyif_cmd *cmd); int trxcon_phyif_handle_rsp(void *priv, const struct trxcon_phyif_rsp *rsp); void trxcon_phyif_close(void *phyif); diff --git a/src/host/trxcon/src/trxcon_shim.c b/src/host/trxcon/src/trxcon_shim.c index ee51036..9da3cb7 100644 --- a/src/host/trxcon/src/trxcon_shim.c +++ b/src/host/trxcon/src/trxcon_shim.c @@ -220,6 +220,19 @@ } /* External L1 API for the PHYIF */ +int trxcon_phyif_handle_rts_ind(void *priv, const struct trxcon_phyif_rts_ind *rts) +{ + struct trxcon_inst *trxcon = priv; + struct l1sched_burst_req br = { + .fn = rts->fn, + .tn = rts->tn, + .burst_len = 0, /* NOPE.ind */ + }; + + l1sched_pull_burst(trxcon->sched, &br); + return l1sched_handle_burst_req(trxcon->sched, &br); +} + int trxcon_phyif_handle_burst_ind(void *priv, const struct trxcon_phyif_burst_ind *phybi) { struct trxcon_inst *trxcon = priv; -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30241 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ic8f74413f5fad277340e007dd4296f890155a2c1 Gerrit-Change-Number: 30241 Gerrit-PatchSet: 8 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmocom-bb[master]: trxcon: implement Ready-to-Receive PHYIF API
by fixeria 29 Nov '22

29 Nov '22
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30262 ) Change subject: trxcon: implement Ready-to-Receive PHYIF API ...................................................................... trxcon: implement Ready-to-Receive PHYIF API This API is going to be used by osmo-trx-ms for inquiring the l1sched about an lchan state before attempting to demodulate a Downlink burst. Change-Id: I9a71b8a59733f4dd908b760c5e23ea3d624afb1a Related: OS#5599 --- M src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h M src/host/trxcon/include/osmocom/bb/trxcon/phyif.h M src/host/trxcon/src/sched_trx.c M src/host/trxcon/src/trxcon_shim.c 4 files changed, 77 insertions(+), 0 deletions(-) Approvals: fixeria: Looks good to me, approved pespin: Looks good to me, but someone else must approve Hoernchen: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h b/src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h index 5202e5e..4b743ca 100644 --- a/src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h +++ b/src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h @@ -162,6 +162,16 @@ size_t burst_len; }; +/* Probed lchan is active */ +#define L1SCHED_PROBE_F_ACTIVE (1 << 0) + +/* RTR (Ready-to-Receive) probe */ +struct l1sched_probe { + uint32_t flags; /* see L1SCHED_PROBE_F_* above */ + uint32_t fn; + uint8_t tn; +}; + typedef int l1sched_lchan_rx_func(struct l1sched_lchan_state *lchan, const struct l1sched_burst_ind *bi); @@ -477,6 +487,8 @@ int l1sched_handle_rx_burst(struct l1sched_state *sched, struct l1sched_burst_ind *bi); +int l1sched_handle_rx_probe(struct l1sched_state *sched, + struct l1sched_probe *probe); /* Shared declarations for lchan handlers */ extern const uint8_t l1sched_nb_training_bits[8][26]; diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h b/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h index ac23ac6..abda393 100644 --- a/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h +++ b/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h @@ -75,6 +75,20 @@ uint8_t tn; }; +/* RTR.ind - Ready-to-Receive indicaton */ +struct trxcon_phyif_rtr_ind { + uint32_t fn; + uint8_t tn; +}; + +/* The probed lchan is active */ +#define TRXCON_PHYIF_RTR_F_ACTIVE (1 << 0) + +/* RTR.rsp - Ready-to-Receive response */ +struct trxcon_phyif_rtr_rsp { + uint32_t flags; /* see TRXCON_PHYIF_RTR_F_* above */ +}; + /* BURST.req - a burst to be transmitted */ struct trxcon_phyif_burst_req { uint32_t fn; @@ -99,6 +113,8 @@ int trxcon_phyif_handle_clock_ind(void *priv, uint32_t fn); int trxcon_phyif_handle_rts_ind(void *priv, const struct trxcon_phyif_rts_ind *rts); +int trxcon_phyif_handle_rtr_ind(void *priv, const struct trxcon_phyif_rtr_ind *ind, + struct trxcon_phyif_rtr_rsp *rsp); int trxcon_phyif_handle_cmd(void *phyif, const struct trxcon_phyif_cmd *cmd); int trxcon_phyif_handle_rsp(void *priv, const struct trxcon_phyif_rsp *rsp); diff --git a/src/host/trxcon/src/sched_trx.c b/src/host/trxcon/src/sched_trx.c index b7d7854..4cedd8a 100644 --- a/src/host/trxcon/src/sched_trx.c +++ b/src/host/trxcon/src/sched_trx.c @@ -804,6 +804,36 @@ return 0; } +int l1sched_handle_rx_probe(struct l1sched_state *sched, + struct l1sched_probe *probe) +{ + struct l1sched_ts *ts = sched->ts[probe->tn]; + const struct l1sched_tdma_frame *frame; + struct l1sched_lchan_state *lchan; + unsigned int offset; + + /* Check whether required timeslot is allocated and configured */ + if (ts == NULL || ts->mf_layout == NULL) + return -EINVAL; + + /* Get frame from multiframe */ + offset = probe->fn % ts->mf_layout->period; + frame = &ts->mf_layout->frames[offset]; + + if (l1sched_lchan_desc[frame->dl_chan].rx_fn == NULL) + return -ENODEV; + + /* Find the appropriate logical channel */ + lchan = l1sched_find_lchan(ts, frame->dl_chan); + if (lchan == NULL) + return -ENODEV; + + if (lchan->active) + probe->flags |= L1SCHED_PROBE_F_ACTIVE; + + return 0; +} + #define MEAS_HIST_FIRST(hist) \ (&hist->buf[0]) #define MEAS_HIST_LAST(hist) \ diff --git a/src/host/trxcon/src/trxcon_shim.c b/src/host/trxcon/src/trxcon_shim.c index 9da3cb7..f8b1872 100644 --- a/src/host/trxcon/src/trxcon_shim.c +++ b/src/host/trxcon/src/trxcon_shim.c @@ -233,6 +233,25 @@ return l1sched_handle_burst_req(trxcon->sched, &br); } +int trxcon_phyif_handle_rtr_ind(void *priv, const struct trxcon_phyif_rtr_ind *ind, + struct trxcon_phyif_rtr_rsp *rsp) +{ + struct trxcon_inst *trxcon = priv; + struct l1sched_probe probe = { + .fn = ind->fn, + .tn = ind->tn, + }; + + l1sched_handle_rx_probe(trxcon->sched, &probe); + + memset(rsp, 0x00, sizeof(*rsp)); + + if (probe.flags & L1SCHED_PROBE_F_ACTIVE) + rsp->flags |= TRXCON_PHYIF_RTR_F_ACTIVE; + + return 0; +} + int trxcon_phyif_handle_burst_ind(void *priv, const struct trxcon_phyif_burst_ind *phybi) { struct trxcon_inst *trxcon = priv; -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30262 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I9a71b8a59733f4dd908b760c5e23ea3d624afb1a Gerrit-Change-Number: 30262 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: msuraev <msuraev(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmocom-bb[master]: trxcon: implement Ready-to-Receive PHYIF API
by fixeria 29 Nov '22

29 Nov '22
Attention is currently required from: msuraev. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30262 ) Change subject: trxcon: implement Ready-to-Receive PHYIF API ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30262 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I9a71b8a59733f4dd908b760c5e23ea3d624afb1a Gerrit-Change-Number: 30262 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: msuraev <msuraev(a)sysmocom.de> Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Tue, 29 Nov 2022 11:03:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmocom-bb[master]: trxcon: implement Ready-to-Send PHYIF API
by fixeria 29 Nov '22

29 Nov '22
Attention is currently required from: Hoernchen, laforge, msuraev. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30241 ) Change subject: trxcon: implement Ready-to-Send PHYIF API ...................................................................... Patch Set 7: (1 comment) File src/host/trxcon/include/osmocom/bb/trxcon/phyif.h: https://gerrit.osmocom.org/c/osmocom-bb/+/30241/comment/e00006dc_22c49c0c PS4, Line 101: trxcon_phyif_handle_rts_ind > @Hoernchen: would it be more useful for you if I added a 'struct trxcon_phyif_burst_req *br' argumen […] No feedback on this, assuming it's not needed. -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30241 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ic8f74413f5fad277340e007dd4296f890155a2c1 Gerrit-Change-Number: 30241 Gerrit-PatchSet: 7 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Tue, 29 Nov 2022 11:02:44 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in osmocom-bb[master]: trxcon: implement Ready-to-Send PHYIF API
by fixeria 29 Nov '22

29 Nov '22
Attention is currently required from: Hoernchen, laforge, msuraev. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30241 ) Change subject: trxcon: implement Ready-to-Send PHYIF API ...................................................................... Patch Set 7: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30241 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ic8f74413f5fad277340e007dd4296f890155a2c1 Gerrit-Change-Number: 30241 Gerrit-PatchSet: 7 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Tue, 29 Nov 2022 11:02:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • ...
  • 251
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.