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-ggsn[master]: gtp: Introduce VTY configurable GTP timer X3
by pespin 23 Nov '22

23 Nov '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/30279 ) Change subject: gtp: Introduce VTY configurable GTP timer X3 ...................................................................... gtp: Introduce VTY configurable GTP timer X3 This timer controls the amount of time a resp message transmitted by the local gsn is to be stored in the resp queue. This is used in order to detect duplicate requests received, since GTP states the exact same response should be answered if a duplicate request is received. Prior to this patch, this timer was hardcoded to 60 seconds. This patch actually should be set, in general, to a value equal than (T3-RESPONSE * N3-REQUESTS) values configured at the peer, since that is the maximum period during which the local gsn expects to receive req retransmissions from the peer. Hence, this value must be user configurable to adapt it to the peers connected to the GSN. The 60 seconds hardcoded value is therefore changed to default to our local (T3-RESPONSE * N3-REQUESTS), since the most common scenario for osmo-ggsn/osmo-sgsn is to run it against a peer osmo-sgsn/osmo-ggsn, which will have the same values by default. This way we avoid by default caching response messages for way too long, potentially filling the queue. Related: OS#5485 Change-Id: Ia15c1cfd201d7c43e9a1d6ceb6725ddf392d2c65 --- M gtp/gsn.c M gtp/gsn.h M gtp/gtp.c 3 files changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/79/30279/1 diff --git a/gtp/gsn.c b/gtp/gsn.c index da30fc9..ce66244 100644 --- a/gtp/gsn.c +++ b/gtp/gsn.c @@ -108,6 +108,9 @@ { .T = GTP_GSN_TIMER_N3_REQUESTS, .default_val = 3, .unit = OSMO_TDEF_CUSTOM, .desc = "Counter N3-REQUESTS holds the maximum number of attempts made by GTP to send a request message" }, + { .T = GTP_GSN_TIMER_T3_HOLD_RESPONSE, .default_val = 5 * 3 /* (GTP_GSN_TIMER_T3_RESPONSE * GTP_GSN_TIMER_N3_REQUESTS) */, .unit = OSMO_TDEF_S, + .desc = "Time a GTP respoonse message is kept cached to re-transmit it when a duplicate request is received. Value is generally equal to (T3-RESPONSE * N3-REQUESTS) set at the peer" + }, {} }; diff --git a/gtp/gsn.h b/gtp/gsn.h index 3b9cb1d..8e47ce3 100644 --- a/gtp/gsn.h +++ b/gtp/gsn.h @@ -67,6 +67,7 @@ enum gtp_gsn_timers { GTP_GSN_TIMER_T3_RESPONSE = 3, GTP_GSN_TIMER_N3_REQUESTS = 1003, + GTP_GSN_TIMER_T3_HOLD_RESPONSE = -3, }; struct gsn_t { diff --git a/gtp/gtp.c b/gtp/gtp.c index f32461c..1ebc6dc 100644 --- a/gtp/gtp.c +++ b/gtp/gtp.c @@ -499,11 +499,13 @@ LOGP(DLGTP, LOGL_ERROR, "Retransmit resp queue is full (seq=%" PRIu16 ")\n", seq); } else { + unsigned int t3_hold_resp; LOGP(DLGTP, LOGL_DEBUG, "Registering seq=%" PRIu16 " in restransmit resp queue\n", seq); + t3_hold_resp = osmo_tdef_get(gsn->tdef, GTP_GSN_TIMER_T3_HOLD_RESPONSE, OSMO_TDEF_S, -1); memcpy(&qmsg->p, packet, sizeof(union gtp_packet)); qmsg->l = len; - qmsg->timeout = time(NULL) + 60; /* When to timeout */ + qmsg->timeout = time(NULL) + t3_hold_resp; /* When to timeout */ qmsg->retrans = 0; /* No retransmissions so far */ qmsg->cbp = NULL; qmsg->type = 0; -- To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/30279 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Change-Id: Ia15c1cfd201d7c43e9a1d6ceb6725ddf392d2c65 Gerrit-Change-Number: 30279 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-bsc[master]: paging: Introduce BTS stat paging:available_slots
by laforge 23 Nov '22

23 Nov '22
Attention is currently required from: pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/30278 ) Change subject: paging: Introduce BTS stat paging:available_slots ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/30278 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I5f44ac9b9da3ed7120b04d199e52215c0fd3e8a9 Gerrit-Change-Number: 30278 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-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 23 Nov 2022 09:23:20 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmocom-bb[master]: trxcon: make burst pointer in trxcon_phyif_burst_ind const
by laforge 23 Nov '22

23 Nov '22
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30254 ) Change subject: trxcon: make burst pointer in trxcon_phyif_burst_ind const ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30254 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I68773d247725a6dc2cbbc58b63c0fd19ffdb1a16 Gerrit-Change-Number: 30254 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Wed, 23 Nov 2022 09:22:36 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-ttcn3-hacks[master]: sccp: fix duplicated beginning of the comment
by laforge 23 Nov '22

23 Nov '22
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30272 ) Change subject: sccp: fix duplicated beginning of the comment ...................................................................... sccp: fix duplicated beginning of the comment Change-Id: Iecc615dc3fa7ef17d7e58e49c780d054df0b53af --- M sccp/SCCP_Tests_RAW.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/sccp/SCCP_Tests_RAW.ttcn b/sccp/SCCP_Tests_RAW.ttcn index fd6bad9..c9b1c78 100644 --- a/sccp/SCCP_Tests_RAW.ttcn +++ b/sccp/SCCP_Tests_RAW.ttcn @@ -178,7 +178,7 @@ } /* Verify sccp_demo_user inactivty timers are not armed upon dealing with -/* connectionless data-unit messages. Since no connection exists. */ + * connectionless data-unit messages. Since no connection exists. */ testcase TC_udt_without_cr_cc() runs on SCCP_Test_RAW_CT { var SCCP_PAR_Address calling, called; var SCCP_MTP3_TRANSFERind rx; -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30272 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Iecc615dc3fa7ef17d7e58e49c780d054df0b53af Gerrit-Change-Number: 30272 Gerrit-PatchSet: 3 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> 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
1 0
0 0
Change in osmo-ttcn3-hacks[master]: sccp: add debug output when the expected PDU doesn't match
by laforge 23 Nov '22

23 Nov '22
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30273 ) Change subject: sccp: add debug output when the expected PDU doesn't match ...................................................................... sccp: add debug output when the expected PDU doesn't match Change-Id: I0fab79fd333f4fdbd5b249d6ede26a5aad214ef1 --- M sccp/SCCP_Tests_RAW.ttcn 1 file changed, 11 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved fixeria: Looks good to me, but someone else must approve diff --git a/sccp/SCCP_Tests_RAW.ttcn b/sccp/SCCP_Tests_RAW.ttcn index c9b1c78..505deb6 100644 --- a/sccp/SCCP_Tests_RAW.ttcn +++ b/sccp/SCCP_Tests_RAW.ttcn @@ -248,6 +248,7 @@ var SCCP_PAR_Address calling, called; var OCT3 remote_lref; var boolean it_received := false; + var SCCP_MTP3_TRANSFERind rx; g_demo_sccp_timer_ias := 1; g_demo_sccp_timer_iar := 3; @@ -273,6 +274,10 @@ setverdict(fail, "Unexpected SCCP RLSD received"); self.stop; } + [] MTP3.receive(tr_SCCP_MTP3_TRANSFERind(*)) -> value rx { + setverdict(fail, "Unexpected MTP/SCCP TRANSFERind received: ", rx); + self.stop; + } [] MTP3.receive { setverdict(fail, "Unexpected MTP/SCCP received"); self.stop; @@ -341,6 +346,7 @@ boolean accept_other_called_resp := false) runs on SCCP_Test_RAW_CT { var boolean exp_something := true; + var SCCP_MTP3_TRANSFERind rx; timer T := 5.0; if (istemplatekind(rx_exp, "omit")) { @@ -357,8 +363,11 @@ [exp_something and accept_other_called_resp] MTP3.receive(tr_SCCP_MTP3_TRANSFERind(tr_SCCP_UDT(called, ?, decmatch rx_exp))) { setverdict(pass); } - [] MTP3.receive(tr_SCCP_MTP3_TRANSFERind(tr_SCCP_UDT(called, calling, ?))) { - setverdict(fail, "Received unexpected SCCP waiting for ", rx_exp); + [] MTP3.receive(tr_SCCP_MTP3_TRANSFERind(tr_SCCP_UDT(called, calling, ?))) -> value rx { + setverdict(fail, "Received unexpected SCCP/MTP3 TRANSFERind (specific): ", rx, " but waiting for (specific) ", rx_exp); + } + [] MTP3.receive(tr_SCCP_MTP3_TRANSFERind(*)) -> value rx { + setverdict(fail, "Received unexpected SCCP/MTP3 TRANSFERind (*): ", rx, " but waiting for ", rx_exp); } [] MTP3.receive { setverdict(fail, "Received unexpected waiting for ", rx_exp); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30273 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I0fab79fd333f4fdbd5b249d6ede26a5aad214ef1 Gerrit-Change-Number: 30273 Gerrit-PatchSet: 3 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> 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
1 0
0 0
Change in osmocom-bb[master]: trxcon: group Rx burst params into struct l1sched_burst_ind
by fixeria 22 Nov '22

22 Nov '22
Hello osmith, Jenkins Builder, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmocom-bb/+/30253 to look at the new patch set (#4). Change subject: trxcon: group Rx burst params into struct l1sched_burst_ind ...................................................................... trxcon: group Rx burst params into struct l1sched_burst_ind Change-Id: I3363c38a43d2f54f846527b70cedac8fa57bcb27 Related: OS#5599 --- M src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h M src/host/trxcon/src/sched_lchan_desc.c M src/host/trxcon/src/sched_lchan_pdtch.c M src/host/trxcon/src/sched_lchan_sch.c M src/host/trxcon/src/sched_lchan_tchf.c M src/host/trxcon/src/sched_lchan_tchh.c M src/host/trxcon/src/sched_lchan_xcch.c M src/host/trxcon/src/sched_trx.c M src/host/trxcon/src/trxcon_shim.c 9 files changed, 122 insertions(+), 101 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/53/30253/4 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30253 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I3363c38a43d2f54f846527b70cedac8fa57bcb27 Gerrit-Change-Number: 30253 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria <vyanitskiy(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: newpatchset
1 0
0 0
Change in osmocom-bb[master]: trxcon: adjust coding style in l1sched_pull_burst()
by fixeria 22 Nov '22

22 Nov '22
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30240 ) Change subject: trxcon: adjust coding style in l1sched_pull_burst() ...................................................................... trxcon: adjust coding style in l1sched_pull_burst() Change-Id: I96a40fdbea5085999b9aeb98b418ae27132f6fda Related: OS#5599 --- M src/host/trxcon/src/sched_trx.c 1 file changed, 14 insertions(+), 33 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/host/trxcon/src/sched_trx.c b/src/host/trxcon/src/sched_trx.c index 2ac6904..92f8bf2 100644 --- a/src/host/trxcon/src/sched_trx.c +++ b/src/host/trxcon/src/sched_trx.c @@ -95,19 +95,15 @@ struct l1sched_lchan_state *lchan; l1sched_lchan_tx_func *handler; enum l1sched_lchan_type chan; - uint8_t offset; + unsigned int offset; - /* Timeslot is not allocated */ - if (ts == NULL) - return; - - /* Timeslot is not configured */ - if (ts->mf_layout == NULL) + /* Check if the given timeslot is configured */ + if (ts == NULL || ts->mf_layout == NULL) return; /* Get frame from multiframe */ offset = br->fn % ts->mf_layout->period; - frame = ts->mf_layout->frames + offset; + frame = &ts->mf_layout->frames[offset]; /* Get required info from frame */ br->bid = frame->ul_bid; @@ -115,41 +111,26 @@ handler = l1sched_lchan_desc[chan].tx_fn; /* Omit lchans without handler */ - if (!handler) + if (handler == NULL) return; - /* Make sure that lchan was allocated and activated */ + /* Make sure that lchan is allocated and active */ lchan = l1sched_find_lchan(ts, chan); - if (lchan == NULL) + if (lchan == NULL || !lchan->active) return; - /* Omit inactive lchans */ - if (!lchan->active) - return; - - /** - * If we aren't processing any primitive yet, - * attempt to obtain a new one from queue - */ + /* If no primitive is being processed, try obtaining one from Tx queue */ if (lchan->prim == NULL) lchan->prim = l1sched_prim_dequeue(&ts->tx_prims, br->fn, lchan); - - /* TODO: report TX buffers health to the higher layers */ - - /* If CBTX (Continuous Burst Transmission) is assumed */ - if (l1sched_lchan_desc[chan].flags & L1SCHED_CH_FLAG_CBTX) { - /** - * Probably, a TX buffer is empty. Nevertheless, - * we shall continuously transmit anything on - * CBTX channels. - */ - if (lchan->prim == NULL) + if (lchan->prim == NULL) { + /* If CBTX (Continuous Burst Transmission) is required */ + if (l1sched_lchan_desc[chan].flags & L1SCHED_CH_FLAG_CBTX) l1sched_prim_dummy(lchan); + if (lchan->prim == NULL) + return; } - /* If there is no primitive, do nothing */ - if (lchan->prim == NULL) - return; + /* TODO: report TX buffers health to the higher layers */ /* Handover RACH needs to be handled regardless of the * current channel type and the associated handler. */ -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30240 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I96a40fdbea5085999b9aeb98b418ae27132f6fda Gerrit-Change-Number: 30240 Gerrit-PatchSet: 5 Gerrit-Owner: fixeria <vyanitskiy(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: rx_sch_fn(): do not use sched->fn_counter_proc
by fixeria 22 Nov '22

22 Nov '22
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30242 ) Change subject: trxcon: rx_sch_fn(): do not use sched->fn_counter_proc ...................................................................... trxcon: rx_sch_fn(): do not use sched->fn_counter_proc Use the given Fn instead, no need to go that deep for it. The sched->fn_counter_proc is an internal field of the scheduler, which is not necessarily holding a valid value when pulling Uplink bursts synchronously via the Ready-to-Send PHYIF API. Change-Id: I56027876b50e53b474c2f54ac216cd141142020e Related: OS#5599 --- M src/host/trxcon/src/sched_lchan_sch.c 1 file changed, 4 insertions(+), 3 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved msuraev: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/host/trxcon/src/sched_lchan_sch.c b/src/host/trxcon/src/sched_lchan_sch.c index c61e134..d943ae8 100644 --- a/src/host/trxcon/src/sched_lchan_sch.c +++ b/src/host/trxcon/src/sched_lchan_sch.c @@ -85,13 +85,14 @@ /* Decode BSIC and TDMA frame number */ decode_sb(&time, &bsic, sb_info); - LOGP_LCHAND(lchan, LOGL_DEBUG, "Received SCH: bsic=%u, fn=%u, sched_fn=%u\n", - bsic, time.fn, lchan->ts->sched->fn_counter_proc); + LOGP_LCHAND(lchan, LOGL_DEBUG, + "Received SCH: bsic=%u, fn=%u, sched_fn=%u\n", + bsic, time.fn, fn); /* Check if decoded frame number matches */ if (time.fn != fn) { LOGP_LCHAND(lchan, LOGL_ERROR, - "Decoded fn=%u does not match fn=%u provided by scheduler\n", + "Decoded fn=%u does not match sched_fn=%u\n", time.fn, fn); return -EINVAL; } 4 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30242 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I56027876b50e53b474c2f54ac216cd141142020e Gerrit-Change-Number: 30242 Gerrit-PatchSet: 6 Gerrit-Owner: fixeria <vyanitskiy(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-MessageType: merged
1 0
0 0
Change in osmocom-bb[master]: trxcon: rework l1sched_trigger(), split l1sched_pull_burst()
by fixeria 22 Nov '22

22 Nov '22
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30239 ) Change subject: trxcon: rework l1sched_trigger(), split l1sched_pull_burst() ...................................................................... trxcon: rework l1sched_trigger(), split l1sched_pull_burst() The key idea is to allow triggering the scheduler only for a specific timeslot of a frame, while keeping the API for triggering all together. Split off the main part from l1sched_trigger() to l1sched_pull_burst(). While at it, rename l1sched_trigger() to l1sched_pull_send_frame(). Change-Id: Ibb7f9d7de26733f21b0753a2c655a250286bf1f0 Related: OS#5599 --- M src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h M src/host/trxcon/src/sched_clck.c M src/host/trxcon/src/sched_trx.c 3 files changed, 85 insertions(+), 81 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved pespin: 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 3dfafb3..31d4b64 100644 --- a/src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h +++ b/src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h @@ -490,7 +490,9 @@ /* Clock and Downlink scheduling trigger */ int l1sched_clck_handle(struct l1sched_state *sched, uint32_t fn); void l1sched_clck_reset(struct l1sched_state *sched); -void l1sched_trigger(struct l1sched_state *sched); + +void l1sched_pull_burst(struct l1sched_state *sched, struct l1sched_burst_req *br); +void l1sched_pull_send_frame(struct l1sched_state *sched); /* External L1 API, must be implemented by the API user */ int l1sched_handle_config_req(struct l1sched_state *sched, diff --git a/src/host/trxcon/src/sched_clck.c b/src/host/trxcon/src/sched_clck.c index ccafd7b..f9eadaf 100644 --- a/src/host/trxcon/src/sched_clck.c +++ b/src/host/trxcon/src/sched_clck.c @@ -82,7 +82,7 @@ GSM_TDMA_FN_INC(sched->fn_counter_proc); /* Trigger the scheduler */ - l1sched_trigger(sched); + l1sched_pull_send_frame(sched); } osmo_timer_schedule(&sched->clock_timer, 0, @@ -95,7 +95,7 @@ sched->fn_counter_proc = fn; /* Trigger the scheduler */ - l1sched_trigger(sched); + l1sched_pull_send_frame(sched); /* Schedule first FN clock */ sched->clock = *tv_now; @@ -176,7 +176,7 @@ GSM_TDMA_FN_INC(sched->fn_counter_proc); /* Trigger the scheduler */ - l1sched_trigger(sched); + l1sched_pull_send_frame(sched); } /* Schedule next FN to be transmitted */ diff --git a/src/host/trxcon/src/sched_trx.c b/src/host/trxcon/src/sched_trx.c index c36b7de..2ac6904 100644 --- a/src/host/trxcon/src/sched_trx.c +++ b/src/host/trxcon/src/sched_trx.c @@ -85,102 +85,104 @@ static void l1sched_a5_burst_enc(struct l1sched_lchan_state *lchan, struct l1sched_burst_req *br); -void l1sched_trigger(struct l1sched_state *sched) +/* Pull an Uplink burst from the scheduler and store it to br->burst[]. + * The TDMA Fn advance must be applied by the caller (if needed). + * The given *br must be initialized by the caller. */ +void l1sched_pull_burst(struct l1sched_state *sched, struct l1sched_burst_req *br) { - struct l1sched_burst_req br[TRX_TS_COUNT]; + struct l1sched_ts *ts = sched->ts[br->tn]; const struct l1sched_tdma_frame *frame; struct l1sched_lchan_state *lchan; l1sched_lchan_tx_func *handler; enum l1sched_lchan_type chan; uint8_t offset; - struct l1sched_ts *ts; - unsigned int tn; + /* Timeslot is not allocated */ + if (ts == NULL) + return; + + /* Timeslot is not configured */ + if (ts->mf_layout == NULL) + return; + + /* Get frame from multiframe */ + offset = br->fn % ts->mf_layout->period; + frame = ts->mf_layout->frames + offset; + + /* Get required info from frame */ + br->bid = frame->ul_bid; + chan = frame->ul_chan; + handler = l1sched_lchan_desc[chan].tx_fn; + + /* Omit lchans without handler */ + if (!handler) + return; + + /* Make sure that lchan was allocated and activated */ + lchan = l1sched_find_lchan(ts, chan); + if (lchan == NULL) + return; + + /* Omit inactive lchans */ + if (!lchan->active) + return; + + /** + * If we aren't processing any primitive yet, + * attempt to obtain a new one from queue + */ + if (lchan->prim == NULL) + lchan->prim = l1sched_prim_dequeue(&ts->tx_prims, br->fn, lchan); + + /* TODO: report TX buffers health to the higher layers */ + + /* If CBTX (Continuous Burst Transmission) is assumed */ + if (l1sched_lchan_desc[chan].flags & L1SCHED_CH_FLAG_CBTX) { + /** + * Probably, a TX buffer is empty. Nevertheless, + * we shall continuously transmit anything on + * CBTX channels. + */ + if (lchan->prim == NULL) + l1sched_prim_dummy(lchan); + } + + /* If there is no primitive, do nothing */ + if (lchan->prim == NULL) + return; + + /* Handover RACH needs to be handled regardless of the + * current channel type and the associated handler. */ + if (L1SCHED_PRIM_IS_RACH(lchan->prim) && lchan->prim->chan != L1SCHED_RACH) + handler = l1sched_lchan_desc[L1SCHED_RACH].tx_fn; + + /* Poke lchan handler */ + handler(lchan, br); + + /* Perform A5/X burst encryption if required */ + if (lchan->a5.algo) + l1sched_a5_burst_enc(lchan, br); +} + +/* Pull *and send* Uplink bursts for all timeslots and the current TDMA Fn. */ +void l1sched_pull_send_frame(struct l1sched_state *sched) +{ /* Advance TDMA frame number in order to give the transceiver * more time to handle the burst before the actual transmission. */ const uint32_t fn = GSM_TDMA_FN_SUM(sched->fn_counter_proc, sched->fn_counter_advance); /* Iterate over timeslot list */ - for (tn = 0; tn < ARRAY_SIZE(br); tn++) { - /* Initialize the buffer for this timeslot */ - br[tn] = (struct l1sched_burst_req) { + for (unsigned int tn = 0; tn < ARRAY_SIZE(sched->ts); tn++) { + struct l1sched_burst_req br = { .fn = fn, .tn = tn, .burst_len = 0, /* NOPE.ind */ }; - /* Timeslot is not allocated */ - ts = sched->ts[tn]; - if (ts == NULL) - continue; - - /* Timeslot is not configured */ - if (ts->mf_layout == NULL) - continue; - - /* Get frame from multiframe */ - offset = fn % ts->mf_layout->period; - frame = ts->mf_layout->frames + offset; - - /* Get required info from frame */ - br[tn].bid = frame->ul_bid; - chan = frame->ul_chan; - handler = l1sched_lchan_desc[chan].tx_fn; - - /* Omit lchans without handler */ - if (!handler) - continue; - - /* Make sure that lchan was allocated and activated */ - lchan = l1sched_find_lchan(ts, chan); - if (lchan == NULL) - continue; - - /* Omit inactive lchans */ - if (!lchan->active) - continue; - - /** - * If we aren't processing any primitive yet, - * attempt to obtain a new one from queue - */ - if (lchan->prim == NULL) - lchan->prim = l1sched_prim_dequeue(&ts->tx_prims, fn, lchan); - - /* TODO: report TX buffers health to the higher layers */ - - /* If CBTX (Continuous Burst Transmission) is assumed */ - if (l1sched_lchan_desc[chan].flags & L1SCHED_CH_FLAG_CBTX) { - /** - * Probably, a TX buffer is empty. Nevertheless, - * we shall continuously transmit anything on - * CBTX channels. - */ - if (lchan->prim == NULL) - l1sched_prim_dummy(lchan); - } - - /* If there is no primitive, do nothing */ - if (lchan->prim == NULL) - continue; - - /* Handover RACH needs to be handled regardless of the - * current channel type and the associated handler. */ - if (L1SCHED_PRIM_IS_RACH(lchan->prim) && lchan->prim->chan != L1SCHED_RACH) - handler = l1sched_lchan_desc[L1SCHED_RACH].tx_fn; - - /* Poke lchan handler */ - handler(lchan, &br[tn]); - - /* Perform A5/X burst encryption if required */ - if (lchan->a5.algo) - l1sched_a5_burst_enc(lchan, &br[tn]); + l1sched_pull_burst(sched, &br); + l1sched_handle_burst_req(sched, &br); } - - /* Send all bursts for this TDMA frame */ - for (tn = 0; tn < ARRAY_SIZE(br); tn++) - l1sched_handle_burst_req(sched, &br[tn]); } void l1sched_logging_init(int log_cat_common, int log_cat_data) -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30239 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ibb7f9d7de26733f21b0753a2c655a250286bf1f0 Gerrit-Change-Number: 30239 Gerrit-PatchSet: 5 Gerrit-Owner: fixeria <vyanitskiy(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-CC: msuraev <msuraev(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmocom-bb[master]: trxcon: adjust coding style in l1sched_pull_burst()
by fixeria 22 Nov '22

22 Nov '22
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30240 ) Change subject: trxcon: adjust coding style in l1sched_pull_burst() ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30240 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I96a40fdbea5085999b9aeb98b418ae27132f6fda Gerrit-Change-Number: 30240 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria <vyanitskiy(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-Comment-Date: Tue, 22 Nov 2022 23:22:18 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • ...
  • 251
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.