pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/29532 )
Change subject: osmux: Drop logging of osmux internal counters
......................................................................
osmux: Drop logging of osmux internal counters
This way we have no more access to internal osmux structures.
If those counters are needed in the future they can be counted by
osmo-bts by means of adding rate counters to the caller of
osmux_xfrm_input() and deliver_cb.
Change-Id: Ib952437ea3aa2770c96bddb667491e7675a6a06e
---
M src/common/osmux.c
1 file changed, 0 insertions(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/32/29532/1
diff --git a/src/common/osmux.c b/src/common/osmux.c
index caea4ec..cacc3aa 100644
--- a/src/common/osmux.c
+++ b/src/common/osmux.c
@@ -130,13 +130,6 @@
LOGP(DOSMUX, LOGL_INFO,
"Releasing unused osmux handle for %s\n",
osmo_sockaddr_to_str(&h->rem_addr));
- LOGP(DOSMUX, LOGL_INFO, "Stats: "
- "input RTP msgs: %u bytes: %" PRIu64 " "
- "output osmux msgs: %u bytes: %" PRIu64 "\n",
- in->stats.input_rtp_msgs,
- in->stats.input_rtp_bytes,
- in->stats.output_osmux_msgs,
- in->stats.output_osmux_bytes);
llist_del(&h->head);
TALLOC_FREE(h->in);
talloc_free(h);
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/29532
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ib952437ea3aa2770c96bddb667491e7675a6a06e
Gerrit-Change-Number: 29532
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29531 )
Change subject: osmux: Drop logging of osmux internal counters
......................................................................
osmux: Drop logging of osmux internal counters
This way we have no more access to internal osmux structures.
Moreover, we already have similar information in our rate_ctrs, so
there's no need to print those there.
Change-Id: I853e118f843070ea29b19e1b0fe56b52f267437a
---
M src/libosmo-mgcp/mgcp_osmux.c
1 file changed, 0 insertions(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/31/29531/1
diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index d151cb1..0dfd2e4 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -136,13 +136,6 @@
LOGP(DOSMUX, LOGL_INFO,
"Releasing unused osmux handle for %s\n",
osmo_sockaddr_to_str(&h->rem_addr));
- LOGP(DOSMUX, LOGL_INFO, "Stats: "
- "input RTP msgs: %u bytes: %"PRIu64" "
- "output osmux msgs: %u bytes: %"PRIu64"\n",
- in->stats.input_rtp_msgs,
- in->stats.input_rtp_bytes,
- in->stats.output_osmux_msgs,
- in->stats.output_osmux_bytes);
llist_del(&h->head);
TALLOC_FREE(h->in);
talloc_free(h);
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29531
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I853e118f843070ea29b19e1b0fe56b52f267437a
Gerrit-Change-Number: 29531
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/29527 )
Change subject: tests/osmo-pcap/osmux: Replace deprecatd API osmux_xfrm_output_init2()
......................................................................
tests/osmo-pcap/osmux: Replace deprecatd API osmux_xfrm_output_init2()
Replacing this one with the newer API was missed a few commits ago when
this API was marked as deprectated. Do it now.
Change-Id: Ia0958dfae951d82feafe427eff2112d327d3b0a4
---
M tests/osmo-pcap-test/osmux_test.c
1 file changed, 9 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/27/29527/1
diff --git a/tests/osmo-pcap-test/osmux_test.c b/tests/osmo-pcap-test/osmux_test.c
index a1aa199..bbb395c 100644
--- a/tests/osmo-pcap-test/osmux_test.c
+++ b/tests/osmo-pcap-test/osmux_test.c
@@ -37,7 +37,7 @@
* This is the output handle for osmux, it stores last RTP sequence and
* timestamp that has been used. There should be one per circuit ID.
*/
-static struct osmux_out_handle h_output;
+static struct osmux_out_handle *h_output;
static void tx_cb(struct msgb *msg, void *data)
{
@@ -57,7 +57,7 @@
/* This code below belongs to the osmux receiver */
while((osmuxh = osmux_xfrm_output_pull(batch_msg)) != NULL)
- osmux_xfrm_output_sched(&h_output, osmuxh);
+ osmux_xfrm_output_sched(h_output, osmuxh);
msgb_free(batch_msg);
}
@@ -190,8 +190,11 @@
osmo_pcap.timer.cb = osmo_pcap_pkt_timer_cb;
osmux_xfrm_input_init(&h_input);
- osmux_xfrm_output_init2(&h_output, 0, 98);
- osmux_xfrm_output_set_tx_cb(&h_output, tx_cb, NULL);
+
+ h_output = osmux_xfrm_output_alloc(tall_test);
+ osmux_xfrm_output_set_rtp_ssrc(h_output, 0);
+ osmux_xfrm_output_set_rtp_pl_type(h_output, 98);
+ osmux_xfrm_output_set_tx_cb(h_output, tx_cb, NULL);
/* first run */
osmo_pcap_pkt_timer_cb(NULL);
@@ -200,5 +203,7 @@
osmo_select_main(0);
}
+ talloc_free(h_output);
+
return ret;
}
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/29527
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ia0958dfae951d82feafe427eff2112d327d3b0a4
Gerrit-Change-Number: 29527
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: pespin.
pespin has removed a vote from this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/29524 )
Change subject: osmux: Split input and output code into separate files
......................................................................
Removed Verified-1 by Jenkins Builder (1000002)
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/29524
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ia72995092a36ca50147611e617cb88c4dcf231d5
Gerrit-Change-Number: 29524
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: deleteVote
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/29525 )
Change subject: cosmetic: osmux: Make litner happy
......................................................................
cosmetic: osmux: Make litner happy
Change-Id: I8472e1b508babfa231c7e0ecc75b4fe63e090a0d
---
M src/osmux_input.c
M src/osmux_output.c
2 files changed, 29 insertions(+), 29 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/25/29525/1
diff --git a/src/osmux_input.c b/src/osmux_input.c
index 2b388f2..2706b11 100644
--- a/src/osmux_input.c
+++ b/src/osmux_input.c
@@ -178,7 +178,7 @@
osmuxh->ft = OSMUX_FT_DUMMY;
osmuxh->ctr = batch_factor - 1;
osmuxh->amr_f = 0;
- osmuxh->amr_q= 0;
+ osmuxh->amr_q = 0;
osmuxh->seq = 0;
osmuxh->circuit_id = state->circuit->ccid;
osmuxh->amr_cmr = 0;
@@ -370,7 +370,7 @@
/* If diff between last RTP packet seen and this one is > 1,
* then we lost several RTP packets, let's replay them.
*/
- for (i=1; i<diff; i++) {
+ for (i = 1; i < diff; i++) {
struct msgb *clone;
/* Clone last RTP packet seen */
@@ -556,33 +556,33 @@
return -1;
}
- switch(rtph->payload_type) {
- case RTP_PT_RTCP:
- LOGP(DLMUX, LOGL_INFO, "Dropping RTCP packet\n");
+ switch (rtph->payload_type) {
+ case RTP_PT_RTCP:
+ LOGP(DLMUX, LOGL_INFO, "Dropping RTCP packet\n");
+ msgb_free(msg);
+ return 0;
+ default:
+ /* The RTP payload type is dynamically allocated,
+ * although we use static ones. Assume that we always
+ * receive AMR traffic.
+ */
+
+ /* Add this RTP to the OSMUX batch */
+ ret = osmux_batch_add(batch, h->batch_factor,
+ msg, rtph, ccid);
+ if (ret < 0) {
+ /* Cannot put this message into the batch.
+ * Malformed, duplicated, OOM. Drop it and tell
+ * the upper layer that we have digest it.
+ */
+ LOGP(DLMUX, LOGL_DEBUG, "Dropping RTP packet instead of adding to batch\n");
msgb_free(msg);
- return 0;
- default:
- /* The RTP payload type is dynamically allocated,
- * although we use static ones. Assume that we always
- * receive AMR traffic.
- */
+ return ret;
+ }
- /* Add this RTP to the OSMUX batch */
- ret = osmux_batch_add(batch, h->batch_factor,
- msg, rtph, ccid);
- if (ret < 0) {
- /* Cannot put this message into the batch.
- * Malformed, duplicated, OOM. Drop it and tell
- * the upper layer that we have digest it.
- */
- LOGP(DLMUX, LOGL_DEBUG, "Dropping RTP packet instead of adding to batch\n");
- msgb_free(msg);
- return ret;
- }
-
- h->stats.input_rtp_msgs++;
- h->stats.input_rtp_bytes += msg->len;
- break;
+ h->stats.input_rtp_msgs++;
+ h->stats.input_rtp_bytes += msg->len;
+ break;
}
return ret;
}
diff --git a/src/osmux_output.c b/src/osmux_output.c
index 069bdd9..a6e6513 100644
--- a/src/osmux_output.c
+++ b/src/osmux_output.c
@@ -203,7 +203,7 @@
}
/*! \brief Generate RTP packets from osmux frame AMR payload set and schedule
- * them for transmission at appropiate time.
+ * them for transmission at appropriate time.
* \param[in] h the osmux out handle handling a specific CID
* \param[in] osmuxh Buffer pointing to osmux frame header structure and AMR payload
* \return Number of generated RTP packets
@@ -252,7 +252,7 @@
h->osmux_seq_ack = osmuxh->seq;
/* In case list is still empty after parsing messages, no need to rearm */
- if(was_empty && !llist_empty(&h->list))
+ if (was_empty && !llist_empty(&h->list))
osmux_xfrm_output_trigger(h);
return i;
}
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/29525
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I8472e1b508babfa231c7e0ecc75b4fe63e090a0d
Gerrit-Change-Number: 29525
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange