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

May 2023

  • 1 participants
  • 2583 discussions
[S] Change in libosmocore[master]: vty: move struct vty_parent_node to private API
by neels 03 May '23

03 May '23
neels has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/libosmocore/+/32576 ) Change subject: vty: move struct vty_parent_node to private API ...................................................................... vty: move struct vty_parent_node to private API Change-Id: Id2070f03b09feea966c5342361d409551e557d38 --- M TODO-RELEASE M include/osmocom/vty/vty.h M src/vty/command.c 3 files changed, 26 insertions(+), 16 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/76/32576/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/32576 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Id2070f03b09feea966c5342361d409551e557d38 Gerrit-Change-Number: 32576 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-CC: Jenkins Builder Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in libosmocore[master]: vty: move struct vty_parent_node to private API
by neels 03 May '23

03 May '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/32576 ) Change subject: vty: move struct vty_parent_node to private API ...................................................................... vty: move struct vty_parent_node to private API Change-Id: Id2070f03b09feea966c5342361d409551e557d38 --- M include/osmocom/vty/vty.h M src/vty/command.c 2 files changed, 24 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/76/32576/1 diff --git a/include/osmocom/vty/vty.h b/include/osmocom/vty/vty.h index 155501e..3a2ec6f 100644 --- a/include/osmocom/vty/vty.h +++ b/include/osmocom/vty/vty.h @@ -56,21 +56,6 @@ VTY_SHELL_SERV }; -struct vty_parent_node { - struct llist_head entry; - - /*! private data, specified by creator */ - void *priv; - void *index; - - /*! Node status of this vty */ - int node; - - /*! When reading from a config file, these are the indenting characters expected for children of - * this VTY node. */ - char *indent; -}; - /*! Internal representation of a single VTY */ struct vty { /*! underlying file (if any) */ diff --git a/src/vty/command.c b/src/vty/command.c index a60b544..e67fd86 100644 --- a/src/vty/command.c +++ b/src/vty/command.c @@ -77,6 +77,21 @@ /* Host information structure. */ struct host host; +struct vty_parent_node { + struct llist_head entry; + + /*! private data, specified by creator */ + void *priv; + void *index; + + /*! Node status of this vty */ + int node; + + /*! When reading from a config file, these are the indenting characters expected for children of + * this VTY node. */ + char *indent; +}; + /* Standard command node structures. */ struct cmd_node auth_node = { AUTH_NODE, -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/32576 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Id2070f03b09feea966c5342361d409551e557d38 Gerrit-Change-Number: 32576 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in libosmocore[master]: vty: show bug in implicit go_parent_node
by neels 03 May '23

03 May '23
Attention is currently required from: laforge, pespin, fixeria. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/32561 to look at the new patch set (#2). Change subject: vty: show bug in implicit go_parent_node ...................................................................... vty: show bug in implicit go_parent_node Add test to show a problem in VTY node exiting. Back in 2017 when I introduced VTY config file scopes by indenting [1], I actually mistook the vty->priv for the vty->index that we use everywhere to link to the state for our VTY nodes. The intention was that each VTY node child level has its own object linked to it by the vty->index pointer. When the config file leaves a scope, the vty->index should reflect the parent object. Instead I implemented that for the vty->priv pointer only, but we don't use that. Why did this bug not show? A problem happens only if: - a node that uses vty->index is nested inside a node that also uses vty->index. - config sets parent node attributes after a child node. - there is no legacy vty_go_parent() function that sets the correct index via a switch(). [1] "VTY: implicit node exit by de-indenting, not parent lookup" 4a31ffa2f0097d96201f80305a0495c57552f0ad I24cbb3f6de111f2d31110c3c484c066f1153aac9 Change-Id: I2472daed7436a1947655b06d34eb217e595bc7f3 --- M tests/vty/vty_transcript_test.c M tests/vty/vty_transcript_test.vty 2 files changed, 138 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/61/32561/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/32561 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I2472daed7436a1947655b06d34eb217e595bc7f3 Gerrit-Change-Number: 32561 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in libosmocore[master]: vty: fix vty->index for implicit go_parent_node
by neels 03 May '23

03 May '23
Attention is currently required from: pespin, fixeria. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/32562 ) Change subject: vty: fix vty->index for implicit go_parent_node ...................................................................... Patch Set 1: (1 comment) File include/osmocom/vty/vty.h: https://gerrit.osmocom.org/c/libosmocore/+/32562/comment/6cbb48b6_806d20af PS1, Line 64: void *index; > Ack no caller ever accesses struct vty_parent_node, it is used internally to remember the VTY scopes being entered and exited; looking back at it now, this should never have become public API, but we were so young and naive... So I assure you that it is safe to put the new member in a human readable place. Could be an idea to move this struct def to the static vty/command.c scope -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/32562 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Id408c678d18ba19b1c1394c3fb657536153d2094 Gerrit-Change-Number: 32562 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Wed, 03 May 2023 00:27:11 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[M] Change in libosmocore[master]: vty: show bug in implicit go_parent_node
by neels 03 May '23

03 May '23
Attention is currently required from: laforge, pespin, fixeria. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/32561 ) Change subject: vty: show bug in implicit go_parent_node ...................................................................... Patch Set 1: (2 comments) Commit Message: https://gerrit.osmocom.org/c/libosmocore/+/32561/comment/21d2eaba_a3e84e25 PS1, Line 26: there is no legacy vty_go_parent() function that sets the correct : index via a switch(). > note: Some of them cannot be dropped since they are used as hooks to do stuff like applying the new […] yes, for example in cs7 config, the go_parent_cb() does the action of applying config changes. But we can definitely get rid of all the *unnecessary* go_parent_cb()s, and all go_parent code that merely sets vty->node to a new constant. I've been doing that here and there over the years already... File tests/vty/vty_transcript_test.c: https://gerrit.osmocom.org/c/libosmocore/+/32561/comment/53aa5949_5f132bfd PS1, Line 344: talloc_asprintf(root_ctx, argv[0]); > `-Werror=format-security`: should be `...(root_ctx, "%s", argv[0]);`. […] yes, seems i wasn't paying attention, thx -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/32561 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I2472daed7436a1947655b06d34eb217e595bc7f3 Gerrit-Change-Number: 32561 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Wed, 03 May 2023 00:22:28 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmo-gprs[master]: gmm: Fix typo in param name passed to logging macro
by pespin 02 May '23

02 May '23
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32574 to look at the new patch set (#2). Change subject: gmm: Fix typo in param name passed to logging macro ...................................................................... gmm: Fix typo in param name passed to logging macro Change-Id: Ib8025f29ddd9916907e14becaadad66336306e8a --- M include/osmocom/gprs/gmm/gmm_private.h 1 file changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/74/32574/2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32574 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Ib8025f29ddd9916907e14becaadad66336306e8a Gerrit-Change-Number: 32574 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
1 0
0 0
[M] Change in osmo-pcu[master]: pcu_l1_if_phy: fix API function names
by pespin 02 May '23

02 May '23
Attention is currently required from: dexter. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/32426 ) Change subject: pcu_l1_if_phy: fix API function names ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/32426 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I395a60b2fba39bac4facec78989bac20f0cef0d3 Gerrit-Change-Number: 32426 Gerrit-PatchSet: 5 Gerrit-Owner: dexter <pmaier(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-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 02 May 2023 19:16:33 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-bts[master]: oml: reset BCCH carrier power reduction mode (if enabled)
by pespin 02 May '23

02 May '23
Attention is currently required from: laforge, fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/32560 ) Change subject: oml: reset BCCH carrier power reduction mode (if enabled) ...................................................................... Patch Set 2: Code-Review+1 (1 comment) Patchset: PS2: Did you actually test the patch to make sure it does what you want in there? I pointed to that place because it's where all bts state fields should be reset, but perhaps you want to do soemthing different here. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32560 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I34468e3fccc490f48e30b159b63308a395b65fa9 Gerrit-Change-Number: 32560 Gerrit-PatchSet: 2 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: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Tue, 02 May 2023 19:15:29 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[L] Change in osmocom-bb[master]: [WIP] trxcon: get rid of the timer driven clock module
by fixeria 02 May '23

02 May '23
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/32575 ) Change subject: [WIP] trxcon: get rid of the timer driven clock module ...................................................................... [WIP] trxcon: get rid of the timer driven clock module This patch causes the following ttcn3-bts-test regressions: * BTS_Tests.TC_tx_power_ramp_adm_state_change * BTS_Tests.TC_acch_overpower_* * BTS_Tests_LAPDm.TC_rec_invalid_frame Change-Id: Ic8a5b6277c6b16392026e0557376257d71c9d230 Related: OS#5500 --- M src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h M src/host/trxcon/include/osmocom/bb/trxcon/phyif.h M src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h M src/host/trxcon/src/Makefile.am D src/host/trxcon/src/sched_clck.c M src/host/trxcon/src/sched_trx.c M src/host/trxcon/src/trx_if.c M src/host/trxcon/src/trxcon_inst.c M src/host/trxcon/src/trxcon_main.c M src/host/trxcon/src/trxcon_shim.c 10 files changed, 29 insertions(+), 271 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/75/32575/1 diff --git a/src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h b/src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h index 39aeeb9..d3b079c 100644 --- a/src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h +++ b/src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h @@ -41,11 +41,6 @@ struct l1sched_state; struct l1sched_ts; -enum l1sched_clck_state { - L1SCHED_CLCK_ST_WAIT, - L1SCHED_CLCK_ST_OK, -}; - enum l1sched_burst_type { L1SCHED_BURST_GMSK, L1SCHED_BURST_8PSK, @@ -319,24 +314,10 @@ struct l1sched_cfg { /*! Logging context (used as prefix for messages) */ const char *log_prefix; - /*! TDMA frame-number advance */ - uint32_t fn_advance; }; /*! One scheduler instance */ struct l1sched_state { - /*! Clock state */ - enum l1sched_clck_state clck_state; - /*! Local clock source */ - struct timespec clock; - /*! Count of processed frames */ - uint32_t fn_counter_proc; - /*! Local frame counter advance */ - uint32_t fn_counter_advance; - /*! Count of lost frames */ - uint32_t fn_counter_lost; - /*! Frame callback timer */ - struct osmo_timer_list clock_timer; /*! List of timeslots maintained by this scheduler */ struct l1sched_ts *ts[TRX_TS_COUNT]; /*! SACCH cache (common for all lchans) */ diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h b/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h index abda393..2ad7a67 100644 --- a/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h +++ b/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h @@ -110,7 +110,6 @@ 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_rtr_ind(void *priv, const struct trxcon_phyif_rtr_ind *ind, diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h b/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h index 1d012de..3d85d59 100644 --- a/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h +++ b/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h @@ -55,7 +55,7 @@ void trxcon_set_log_cfg(const int *logc, unsigned int logc_num); -struct trxcon_inst *trxcon_inst_alloc(void *ctx, unsigned int id, uint32_t fn_advance); +struct trxcon_inst *trxcon_inst_alloc(void *ctx, unsigned int id); void trxcon_inst_free(struct trxcon_inst *trxcon); int trxcon_l1ctl_receive(struct trxcon_inst *trxcon, struct msgb *msg); diff --git a/src/host/trxcon/src/Makefile.am b/src/host/trxcon/src/Makefile.am index c96949a..7be7de6 100644 --- a/src/host/trxcon/src/Makefile.am +++ b/src/host/trxcon/src/Makefile.am @@ -23,7 +23,6 @@ sched_lchan_rach.c \ sched_lchan_sch.c \ sched_mframe.c \ - sched_clck.c \ sched_prim.c \ sched_trx.c \ $(NULL) diff --git a/src/host/trxcon/src/sched_clck.c b/src/host/trxcon/src/sched_clck.c deleted file mode 100644 index f9eadaf..0000000 --- a/src/host/trxcon/src/sched_clck.c +++ /dev/null @@ -1,200 +0,0 @@ -/* - * OsmocomBB <-> SDR connection bridge - * TDMA scheduler: clock synchronization - * - * (C) 2013 by Andreas Eversberg <jolly(a)eversberg.eu> - * (C) 2015 by Alexander Chemeris <Alexander.Chemeris(a)fairwaves.co> - * (C) 2015 by Harald Welte <laforge(a)gnumonks.org> - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ - -#include <stdio.h> -#include <errno.h> -#include <stdlib.h> -#include <stdint.h> -#include <inttypes.h> -#include <string.h> - -#include <osmocom/core/logging.h> -#include <osmocom/core/talloc.h> -#include <osmocom/core/msgb.h> -#include <osmocom/core/timer.h> -#include <osmocom/core/timer_compat.h> - -#include <osmocom/bb/l1sched/l1sched.h> -#include <osmocom/bb/l1sched/logging.h> - -#define MAX_FN_SKEW 50 -#define TRX_LOSS_FRAMES 400 - -static void l1sched_clck_tick(void *data) -{ - struct l1sched_state *sched = (struct l1sched_state *) data; - struct timespec tv_now, *tv_clock, elapsed; - int64_t elapsed_us; - const struct timespec frame_duration = { .tv_sec = 0, .tv_nsec = GSM_TDMA_FN_DURATION_nS }; - - /* Check if transceiver is still alive */ - if (sched->fn_counter_lost++ == TRX_LOSS_FRAMES) { - LOGP_SCHEDC(sched, LOGL_NOTICE, "No more clock from transceiver\n"); - sched->clck_state = L1SCHED_CLCK_ST_WAIT; - - return; - } - - /* Get actual / previous frame time */ - osmo_clock_gettime(CLOCK_MONOTONIC, &tv_now); - tv_clock = &sched->clock; - - timespecsub(&tv_now, tv_clock, &elapsed); - elapsed_us = (elapsed.tv_sec * 1000000) + (elapsed.tv_nsec / 1000); - - /* If someone played with clock, or if the process stalled */ - if (elapsed_us > GSM_TDMA_FN_DURATION_uS * MAX_FN_SKEW || elapsed_us < 0) { - LOGP_SCHEDC(sched, LOGL_NOTICE, "PC clock skew: " - "elapsed uS %" PRId64 "\n", elapsed_us); - - sched->clck_state = L1SCHED_CLCK_ST_WAIT; - - return; - } - - /* Schedule next FN clock */ - while (elapsed_us > GSM_TDMA_FN_DURATION_uS / 2) { - timespecadd(tv_clock, &frame_duration, tv_clock); - elapsed_us -= GSM_TDMA_FN_DURATION_uS; - - GSM_TDMA_FN_INC(sched->fn_counter_proc); - - /* Trigger the scheduler */ - l1sched_pull_send_frame(sched); - } - - osmo_timer_schedule(&sched->clock_timer, 0, - GSM_TDMA_FN_DURATION_uS - elapsed_us); -} - -static void l1sched_clck_correct(struct l1sched_state *sched, - struct timespec *tv_now, uint32_t fn) -{ - sched->fn_counter_proc = fn; - - /* Trigger the scheduler */ - l1sched_pull_send_frame(sched); - - /* Schedule first FN clock */ - sched->clock = *tv_now; - memset(&sched->clock_timer, 0, sizeof(sched->clock_timer)); - - sched->clock_timer.cb = l1sched_clck_tick; - sched->clock_timer.data = sched; - osmo_timer_schedule(&sched->clock_timer, 0, GSM_TDMA_FN_DURATION_uS); -} - -int l1sched_clck_handle(struct l1sched_state *sched, uint32_t fn) -{ - struct timespec tv_now, *tv_clock, elapsed; - int64_t elapsed_us, elapsed_fn; - - /* Reset lost counter */ - sched->fn_counter_lost = 0; - - /* Get actual / previous frame time */ - osmo_clock_gettime(CLOCK_MONOTONIC, &tv_now); - tv_clock = &sched->clock; - - /* If this is the first CLCK IND */ - if (sched->clck_state == L1SCHED_CLCK_ST_WAIT) { - l1sched_clck_correct(sched, &tv_now, fn); - - LOGP_SCHEDC(sched, LOGL_NOTICE, "Initial clock received: fn=%u\n", fn); - sched->clck_state = L1SCHED_CLCK_ST_OK; - - return 0; - } - - LOGP_SCHEDC(sched, LOGL_DEBUG, "Clock indication: fn=%u\n", fn); - - osmo_timer_del(&sched->clock_timer); - - /* Calculate elapsed time / frames since last processed fn */ - timespecsub(&tv_now, tv_clock, &elapsed); - elapsed_us = (elapsed.tv_sec * 1000000) + (elapsed.tv_nsec / 1000); - elapsed_fn = GSM_TDMA_FN_SUB(fn, sched->fn_counter_proc); - - if (elapsed_fn >= 135774) - elapsed_fn -= GSM_TDMA_HYPERFRAME; - - /* Check for max clock skew */ - if (elapsed_fn > MAX_FN_SKEW || elapsed_fn < -MAX_FN_SKEW) { - LOGP_SCHEDC(sched, LOGL_NOTICE, "GSM clock skew: old fn=%u, " - "new fn=%u\n", sched->fn_counter_proc, fn); - - l1sched_clck_correct(sched, &tv_now, fn); - return 0; - } - - LOGP_SCHEDC(sched, LOGL_DEBUG, "GSM clock jitter: %" PRId64 "\n", - elapsed_fn * GSM_TDMA_FN_DURATION_uS - elapsed_us); - - /* Too many frames have been processed already */ - if (elapsed_fn < 0) { - struct timespec duration; - /** - * Set clock to the time or last FN should - * have been transmitted - */ - duration.tv_nsec = (0 - elapsed_fn) * GSM_TDMA_FN_DURATION_nS; - duration.tv_sec = duration.tv_nsec / 1000000000; - duration.tv_nsec = duration.tv_nsec % 1000000000; - timespecadd(&tv_now, &duration, tv_clock); - - /* Set time to the time our next FN has to be transmitted */ - osmo_timer_schedule(&sched->clock_timer, 0, - GSM_TDMA_FN_DURATION_uS * (1 - elapsed_fn)); - - return 0; - } - - /* Transmit what we still need to transmit */ - while (fn != sched->fn_counter_proc) { - GSM_TDMA_FN_INC(sched->fn_counter_proc); - - /* Trigger the scheduler */ - l1sched_pull_send_frame(sched); - } - - /* Schedule next FN to be transmitted */ - *tv_clock = tv_now; - osmo_timer_schedule(&sched->clock_timer, 0, GSM_TDMA_FN_DURATION_uS); - - return 0; -} - -void l1sched_clck_reset(struct l1sched_state *sched) -{ - /* Reset internal state */ - sched->clck_state = L1SCHED_CLCK_ST_WAIT; - - /* Stop clock timer */ - osmo_timer_del(&sched->clock_timer); - - /* Flush counters */ - sched->fn_counter_proc = 0; - sched->fn_counter_lost = 0; -} diff --git a/src/host/trxcon/src/sched_trx.c b/src/host/trxcon/src/sched_trx.c index bcd24f0..4120ada 100644 --- a/src/host/trxcon/src/sched_trx.c +++ b/src/host/trxcon/src/sched_trx.c @@ -152,27 +152,6 @@ 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 (unsigned int tn = 0; tn < ARRAY_SIZE(sched->ts); tn++) { - struct l1sched_burst_req br = { - .fn = fn, - .tn = tn, - .burst_len = 0, /* NOPE.ind */ - }; - - l1sched_pull_burst(sched, &br); - l1sched_handle_burst_req(sched, &br); - } -} - void l1sched_logging_init(int log_cat_common, int log_cat_data) { l1sched_log_cat_common = log_cat_common; @@ -188,8 +167,6 @@ return NULL; *sched = (struct l1sched_state) { - /* .clock_timer is set up in l1sched_clck_correct() */ - .fn_counter_advance = cfg->fn_advance, .priv = priv, }; @@ -216,7 +193,6 @@ for (tn = 0; tn < ARRAY_SIZE(sched->ts); tn++) l1sched_del_ts(sched, tn); - l1sched_clck_reset(sched); talloc_free(sched); } @@ -234,10 +210,6 @@ for (tn = 0; tn < ARRAY_SIZE(sched->ts); tn++) l1sched_del_ts(sched, tn); - /* Stop and reset clock counter if required */ - if (reset_clock) - l1sched_clck_reset(sched); - memcpy(&sched->sacch_cache[0], &meas_rep_dummy[0], sizeof(meas_rep_dummy)); } diff --git a/src/host/trxcon/src/trx_if.c b/src/host/trxcon/src/trx_if.c index 330fd62..b3a7db6 100644 --- a/src/host/trxcon/src/trx_if.c +++ b/src/host/trxcon/src/trx_if.c @@ -701,10 +701,16 @@ "RX burst tn=%u fn=%u rssi=%d toa=%d\n", bi.tn, bi.fn, bi.rssi, bi.toa256); - if (bi.fn % 51 == 0) - trxcon_phyif_handle_clock_ind(trx->priv, bi.fn); + trxcon_phyif_handle_burst_ind(trx->priv, &bi); - return trxcon_phyif_handle_burst_ind(trx->priv, &bi); + struct trxcon_phyif_rts_ind rts = { + .fn = bi.fn, + .tn = bi.tn, + }; + + trxcon_phyif_handle_rts_ind(trx->priv, &rts); + + return 0; } int trx_if_handle_phyif_burst_req(struct trx_instance *trx, diff --git a/src/host/trxcon/src/trxcon_inst.c b/src/host/trxcon/src/trxcon_inst.c index 65e63b3..b7ff581 100644 --- a/src/host/trxcon/src/trxcon_inst.c +++ b/src/host/trxcon/src/trxcon_inst.c @@ -63,7 +63,7 @@ l1sched_logging_init(schc, schd); } -struct trxcon_inst *trxcon_inst_alloc(void *ctx, unsigned int id, uint32_t fn_advance) +struct trxcon_inst *trxcon_inst_alloc(void *ctx, unsigned int id) { struct trxcon_inst *trxcon; struct osmo_fsm_inst *fi; @@ -85,7 +85,6 @@ /* Init scheduler */ const struct l1sched_cfg sched_cfg = { - .fn_advance = fn_advance, .log_prefix = trxcon->log_prefix, }; diff --git a/src/host/trxcon/src/trxcon_main.c b/src/host/trxcon/src/trxcon_main.c index d30c98e..948ebd4 100644 --- a/src/host/trxcon/src/trxcon_main.c +++ b/src/host/trxcon/src/trxcon_main.c @@ -65,7 +65,6 @@ const char *trx_bind_ip; const char *trx_remote_ip; uint16_t trx_base_port; - uint32_t trx_fn_advance; /* PHY quirk: FBSB timeout extension (in TDMA FNs) */ unsigned int phyq_fbsb_extend_fns; @@ -79,7 +78,6 @@ .trx_remote_ip = "127.0.0.1", .trx_bind_ip = "0.0.0.0", .trx_base_port = 6700, - .trx_fn_advance = 3, .phyq_fbsb_extend_fns = 0, }; @@ -127,7 +125,7 @@ { struct trxcon_inst *trxcon; - trxcon = trxcon_inst_alloc(l1c, l1c->id, app_data.trx_fn_advance); + trxcon = trxcon_inst_alloc(l1c, l1c->id); if (trxcon == NULL) { l1ctl_client_conn_close(l1c); return; @@ -183,7 +181,6 @@ printf(" -b --trx-bind TRX bind IP address (default 0.0.0.0)\n"); printf(" -i --trx-remote TRX remote IP address (default 127.0.0.1)\n"); printf(" -p --trx-port Base port of TRX instance (default 6700)\n"); - printf(" -f --trx-advance Uplink burst scheduling advance (default 3)\n"); printf(" -F --fbsb-extend FBSB timeout extension (in TDMA FNs, default 0)\n"); printf(" -s --socket Listening socket for layer23 (default /tmp/osmocom_l2)\n"); printf(" -g --gsmtap-ip The destination IP used for GSMTAP (disabled by default)\n"); @@ -244,11 +241,7 @@ } break; case 'f': - app_data.trx_fn_advance = strtoul(optarg, &endptr, 10); - if (errno || *endptr != '\0') { - fprintf(stderr, "Failed to parse -f/--trx-advance=%s\n", optarg); - exit(EXIT_FAILURE); - } + /* XXX: no-op */ break; case 'F': app_data.phyq_fbsb_extend_fns = strtoul(optarg, &endptr, 10); diff --git a/src/host/trxcon/src/trxcon_shim.c b/src/host/trxcon/src/trxcon_shim.c index 8b42efe..54d976a 100644 --- a/src/host/trxcon/src/trxcon_shim.c +++ b/src/host/trxcon/src/trxcon_shim.c @@ -237,13 +237,6 @@ return l1sched_handle_rx_burst(trxcon->sched, &bi); } -int trxcon_phyif_handle_clock_ind(void *priv, uint32_t fn) -{ - struct trxcon_inst *trxcon = priv; - - return l1sched_clck_handle(trxcon->sched, fn); -} - int trxcon_phyif_handle_rsp(void *priv, const struct trxcon_phyif_rsp *rsp) { struct trxcon_inst *trxcon = priv; -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/32575 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ic8a5b6277c6b16392026e0557376257d71c9d230 Gerrit-Change-Number: 32575 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-pcu[master]: pcu_l1_if_phy: fix API function names
by fixeria 02 May '23

02 May '23
Attention is currently required from: dexter. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/32426 ) Change subject: pcu_l1_if_phy: fix API function names ...................................................................... Patch Set 5: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/32426 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I395a60b2fba39bac4facec78989bac20f0cef0d3 Gerrit-Change-Number: 32426 Gerrit-PatchSet: 5 Gerrit-Owner: dexter <pmaier(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-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 02 May 2023 17:59:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 245
  • 246
  • 247
  • 248
  • 249
  • 250
  • 251
  • ...
  • 259
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.