laforge has submitted this change. (
https://gerrit.osmocom.org/c/osmo-e1d/+/27841 )
Change subject: e1oip: Add rate_ctr for IP->E1 RIFO overflows
......................................................................
e1oip: Add rate_ctr for IP->E1 RIFO overflows
This typically happens if the remote IP peer is transmitting at a faster
rate than the E1 side is consuming. Let's add a way to monitor it.
Change-Id: Ie0e8bb2f5d2ae4256952f6bf69e514d5c2627a76
---
M src/octoi/e1oip.c
M src/octoi/e1oip.h
2 files changed, 6 insertions(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/src/octoi/e1oip.c b/src/octoi/e1oip.c
index b767ba7..7f15e45 100644
--- a/src/octoi/e1oip.c
+++ b/src/octoi/e1oip.c
@@ -46,6 +46,7 @@
static const struct rate_ctr_desc iline_ctr_description[] = {
[LINE_CTR_E1oIP_UNDERRUN] = { "e1oip:underrun", "Frames underrun /
slipped in IP->E1 direction"},
[LINE_CTR_E1oIP_SUBSTITUTED] = { "e1oip:substituted", "Frames substituted
in E1->IP direction"},
+ [LINE_CTR_E1oIP_E1T_OVERFLOW] = { "e1oip:e1t_overflow", "Frames
overflowing the RIFO in E1->IP direction"},
[LINE_CTR_E1oIP_E1O_OVERFLOW] = { "e1oip:e1o_overflow", "Frames
overflowed in IP->E1 direction"},
[LINE_CTR_E1oIP_RX_OUT_OF_ORDER] = { "e1oip:rx:pkt_out_of_order",
"Packets out-of-order in IP->E1 direction"},
[LINE_CTR_E1oIP_RX_OUT_OF_WIN] = { "e1oip:rx:pkt_out_of_win", "Packets
out-of-rx-window in IP->E1 direction"},
@@ -245,12 +246,15 @@
memcpy(frame_buf, iline->e1t.last_frame, BYTES_PER_FRAME);
for (unsigned int i = 0; i < n_frames; i++) {
+ int rc;
for (unsigned int j = 0; j < num_ts; j++) {
uint8_t ts_nr = idx2ts[j];
frame_buf[ts_nr] = e1th->data[i*num_ts + j];
}
/* FIXME: what to do about TS0? */
- frame_rifo_in(&iline->e1t.rifo, frame_buf, fn32+i);
+ rc = frame_rifo_in(&iline->e1t.rifo, frame_buf, fn32+i);
+ if (rc < 0)
+ iline_ctr_add(iline, LINE_CTR_E1oIP_E1T_OVERFLOW, 1);
}
/* update local state */
memcpy(iline->e1t.last_frame, frame_buf, BYTES_PER_FRAME);
diff --git a/src/octoi/e1oip.h b/src/octoi/e1oip.h
index 65ae473..54d299a 100644
--- a/src/octoi/e1oip.h
+++ b/src/octoi/e1oip.h
@@ -16,6 +16,7 @@
enum e1oip_line_ctr {
LINE_CTR_E1oIP_UNDERRUN,
LINE_CTR_E1oIP_SUBSTITUTED,
+ LINE_CTR_E1oIP_E1T_OVERFLOW,
LINE_CTR_E1oIP_E1O_OVERFLOW,
LINE_CTR_E1oIP_RX_OUT_OF_ORDER,
LINE_CTR_E1oIP_RX_OUT_OF_WIN,
--
To view, visit
https://gerrit.osmocom.org/c/osmo-e1d/+/27841
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: Ie0e8bb2f5d2ae4256952f6bf69e514d5c2627a76
Gerrit-Change-Number: 27841
Gerrit-PatchSet: 7
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: manawyrm <osmocom.account(a)tbspace.de>
Gerrit-Reviewer: roox <mardnh(a)gmx.de>
Gerrit-Reviewer: tnt <tnt(a)246tNt.com>
Gerrit-MessageType: merged