Attention is currently required from: tnt.
Hello tnt,
I'd like you to do a code review. Please visit
https://gerrit.osmocom.org/c/osmo-e1d/+/27834
to review the following change.
Change subject: octoi: Simple RX priming / pre-filling
......................................................................
octoi: Simple RX priming / pre-filling
This was not an issue with the original FIFO code, which dynamically
substituted frames and always created the minimal required backlog.
The RIFO can by principle not operate this way, so we really have to
prime / pre-fill it with a number of TDM frames. That initial fill
level has to be sufficient to cover RTT jitter of the OCTOI link as
well as clock drift between (GPS synced) receiver and transmitter.
Signed-off-by: Sylvain Munaut <tnt(a)246tNt.com>
Change-Id: I3a4b3846d3dbd1c99989e994ad95e609f2757219
---
M src/octoi/e1oip.c
M src/octoi/e1oip.h
M src/octoi/octoi.c
3 files changed, 9 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/34/27834/1
diff --git a/src/octoi/e1oip.c b/src/octoi/e1oip.c
index 5dd3bbf..6a5a240 100644
--- a/src/octoi/e1oip.c
+++ b/src/octoi/e1oip.c
@@ -286,7 +286,7 @@
e1oip_line_set_name(iline, peer->name);
iline->cfg.batching_factor = 32;
- iline->cfg.prefill_frame_count = 400; /* 50ms */
+ iline->cfg.prefill_frame_count = 200; /* 25ms */
e1oip_line_reset(iline);
@@ -305,6 +305,7 @@
frame_rifo_init(&iline->e1t.rifo);
memset(&iline->e1t.last_frame, 0xff, sizeof(iline->e1t.last_frame));
iline->e1t.next_fn32 = 0;
+ iline->e1t.primed_rx_tdm = false;
}
void e1oip_line_destroy(struct e1oip_line *iline)
diff --git a/src/octoi/e1oip.h b/src/octoi/e1oip.h
index 70e1bbb..1a184d2 100644
--- a/src/octoi/e1oip.h
+++ b/src/octoi/e1oip.h
@@ -53,6 +53,7 @@
struct frame_rifo rifo;
uint8_t last_frame[BYTES_PER_FRAME]; /* last frame on the E1 side */
uint32_t next_fn32; /* next expected frame number */
+ bool primed_rx_tdm; /* Was RX RIFO primed */
} e1t;
/* TODO: statistics (RTT, frame loss, std deviation, alarms */
diff --git a/src/octoi/octoi.c b/src/octoi/octoi.c
index d2960ac..8585f0d 100644
--- a/src/octoi/octoi.c
+++ b/src/octoi/octoi.c
@@ -118,6 +118,12 @@
if (!peer->tdm_permitted)
return;
+ if (!iline->e1t.primed_rx_tdm) {
+ if (frame_rifo_frames(&iline->e1t.rifo) > iline->cfg.prefill_frame_count)
+ iline->e1t.primed_rx_tdm = true;
+ return;
+ }
+
for (int i = 0; i < fts; i++) {
uint8_t *cur = buf + BYTES_PER_FRAME*i;
rc = frame_rifo_out(&iline->e1t.rifo, cur);
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/27834
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I3a4b3846d3dbd1c99989e994ad95e609f2757219
Gerrit-Change-Number: 27834
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: tnt <tnt(a)246tNt.com>
Gerrit-Attention: tnt <tnt(a)246tNt.com>
Gerrit-MessageType: newchange
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-dev/+/27831 )
Change subject: osmo-add-gerrit-hooks.sh: do not use ssh host alias 'go'
......................................................................
osmo-add-gerrit-hooks.sh: do not use ssh host alias 'go'
... because it may not be defined. Specify the address explicitly.
Change-Id: I55c1501de61fe6b63be12b8e138742bd4b8baf64
---
M src/osmo-add-gerrit-hooks.sh
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/31/27831/1
diff --git a/src/osmo-add-gerrit-hooks.sh b/src/osmo-add-gerrit-hooks.sh
index 1fbba38..05f1b90 100755
--- a/src/osmo-add-gerrit-hooks.sh
+++ b/src/osmo-add-gerrit-hooks.sh
@@ -13,7 +13,7 @@
for r in $(find . -maxdepth 2 -name '.git'); do
cd "$base/$r"
if [ ! -f "hooks/commit-msg" ]; then
- scp go:hooks/commit-msg hooks/
+ scp -P 29418 gerrit.osmocom.org:hooks/commit-msg hooks/
fi
sed -i 's/if (unprinted /if (0 \&\& unprinted /' hooks/commit-msg
done
--
To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/27831
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-Change-Id: I55c1501de61fe6b63be12b8e138742bd4b8baf64
Gerrit-Change-Number: 27831
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: tnt.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-e1d/+/27826 )
Change subject: OCTOI: Fix the extension of 16b FN from packet to full 32b FN
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/27826
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I25b2e150d924aa8c714b766cb92e9e23e67cfa4c
Gerrit-Change-Number: 27826
Gerrit-PatchSet: 2
Gerrit-Owner: tnt <tnt(a)246tNt.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: tnt <tnt(a)246tNt.com>
Gerrit-Comment-Date: Tue, 19 Apr 2022 17:02:16 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment