This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Max gerrit-no-reply at lists.osmocom.org
Review at https://gerrit.osmocom.org/1343
Save seq. num. of RTP in Control Buffer
Having this information is useful for debugging - save it alongside with
Marker bit from RTP header.
Change-Id: I359b3bcb74fbfc071547fe2f9d837829374fe997
---
M include/osmo-bts/msg_utils.h
M src/common/l1sap.c
2 files changed, 9 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/43/1343/1
diff --git a/include/osmo-bts/msg_utils.h b/include/osmo-bts/msg_utils.h
index 4f9868c..dcc122f 100644
--- a/include/osmo-bts/msg_utils.h
+++ b/include/osmo-bts/msg_utils.h
@@ -16,6 +16,9 @@
/* Access 1st byte of msgb control buffer */
#define rtpmsg_marker_bit(x) ((x)->cb[0])
+/* Access 2nd and 3rd bytes of msgb control buffer as uint16_t */
+#define rtpmsg_seq(x) (&(x)->cb[1])
+
/**
* Classification of OML message. ETSI for plain GSM 12.21
* messages and IPA/Osmo for manufacturer messages.
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 553011f..b0475ed 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -662,6 +662,7 @@
struct gsm_time g_time;
struct gsm_lchan *lchan;
uint8_t chan_nr, marker = 0;
+ uint16_t seq;
uint32_t fn;
chan_nr = rts_ind->chan_nr;
@@ -695,6 +696,8 @@
} else {
/* Obtain RTP header Marker bit from control buffer */
marker = rtpmsg_marker_bit(resp_msg);
+ /* Obtain RTP header Sequence Number from control buffer */
+ seq = osmo_load16le(rtpmsg_seq(resp_msg));
resp_msg->l2h = resp_msg->data;
msgb_push(resp_msg, sizeof(*resp_l1sap));
@@ -1075,8 +1078,10 @@
/* Store RTP header Marker bit in control buffer */
rtpmsg_marker_bit(msg) = marker;
+ /* Store RTP header Sequence Number in control buffer */
+ osmo_store16le(seq_number, rtpmsg_seq(msg));
- /* make sure the queue doesn't get too long */
+ /* make sure the queue doesn't get too long */
llist_for_each_entry(tmp, &lchan->dl_tch_queue, list)
count++;
while (count >= 2) {
--
To view, visit https://gerrit.osmocom.org/1343
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I359b3bcb74fbfc071547fe2f9d837829374fe997
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>