laforge has uploaded this change for review.

View Change

octoi: Add new rate-counter for out-of-order packets

Change-Id: Ie97c1efecf8b673620ddc097e0184f8a9c92c3f0
---
M src/octoi/e1oip.c
M src/octoi/e1oip.h
2 files changed, 4 insertions(+), 0 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/29/27829/1
diff --git a/src/octoi/e1oip.c b/src/octoi/e1oip.c
index 27eb201..e14d719 100644
--- a/src/octoi/e1oip.c
+++ b/src/octoi/e1oip.c
@@ -22,6 +22,7 @@
#include <errno.h>
#include <unistd.h>
#include <stdint.h>
+#include <inttypes.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
@@ -45,6 +46,7 @@
static const struct rate_ctr_desc iline_ctr_description[] = {
[LINE_CTR_E1oIP_UNDERRUN] = { "e1oip:underrun", "Frames missing/substituted in IP->E1 direction"},
[LINE_CTR_E1oIP_OVERFLOW] = { "e1oip: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"},
};

static const struct rate_ctr_group_desc iline_ctrg_desc = {
@@ -204,6 +206,7 @@
re_ordering = false;
}

+ iline_ctr_add(iline, LINE_CTR_E1oIP_RX_OUT_OF_ORDER, 1);
LOGPEER(peer, LOGL_NOTICE, "RxIP: frame_nr=%u, but expected %u: delta=%d - assuming %s\n",
frame_nr, exp_next_seq, delta, re_ordering ? "re-ordering" : "packet loss");

diff --git a/src/octoi/e1oip.h b/src/octoi/e1oip.h
index 54fbadd..1a71f6c 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_OVERFLOW,
+ LINE_CTR_E1oIP_RX_OUT_OF_ORDER,
};

enum e1oip_line_stat {

To view, visit change 27829. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: Ie97c1efecf8b673620ddc097e0184f8a9c92c3f0
Gerrit-Change-Number: 27829
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge@osmocom.org>
Gerrit-MessageType: newchange