aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-09-16 18:35:02 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2021-09-20 16:25:47 +0200
commit5a2d8716ef412f11bdd61c353894e0725836c3ff (patch)
treeb424c1479e88ed885e3ad59eea42b6548d6e0326
parent92186c672d762ae38fc0041e1b6638c1cbe282f5 (diff)
abis: Drop internal OML msg queue
There's no real use for this queue. If the link is gone, it makes no sense to keep old messages. Instead, BTS should generate new messages sharing current state when link becomes established (it actually does so already). Change-Id: Iecd3c7cb96f5fff3b4c7e04c74e031df0f7a6987
-rw-r--r--include/osmo-bts/bts.h1
-rw-r--r--src/common/abis.c26
-rw-r--r--src/common/bts.c1
3 files changed, 6 insertions, 22 deletions
diff --git a/include/osmo-bts/bts.h b/include/osmo-bts/bts.h
index 6e0e47b1..d3cb6bff 100644
--- a/include/osmo-bts/bts.h
+++ b/include/osmo-bts/bts.h
@@ -302,7 +302,6 @@ struct gsm_bts {
struct paging_state *paging_state;
struct llist_head bsc_oml_hosts;
- struct llist_head oml_queue;
unsigned int rtp_jitter_buf_ms;
bool rtp_jitter_adaptive;
diff --git a/src/common/abis.c b/src/common/abis.c
index 31a3505b..8e713d27 100644
--- a/src/common/abis.c
+++ b/src/common/abis.c
@@ -104,19 +104,6 @@ static void reset_oml_link(struct gsm_bts *bts)
memset(&bts->oml_conn_established_timestamp, 0, sizeof(bts->oml_conn_established_timestamp));
}
-static void drain_oml_queue(struct gsm_bts *bts)
-{
- struct msgb *msg, *msg2;
-
- llist_for_each_entry_safe(msg, msg2, &bts->oml_queue, list) {
- /* osmo-bts uses msg->trx internally, but libosmo-abis uses
- * the signalling link at msg->dst */
- llist_del(&msg->list);
- msg->dst = bts->oml_link;
- abis_sendmsg(msg);
- }
-}
-
static int pick_next_bsc(struct osmo_fsm_inst *fi)
{
struct abis_link_fsm_priv *priv = fi->priv;
@@ -208,7 +195,6 @@ static void abis_link_connecting(struct osmo_fsm_inst *fi, uint32_t event, void
static void abis_link_connected_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state)
{
- drain_oml_queue(g_bts);
bts_link_estab(g_bts);
}
@@ -324,14 +310,14 @@ int abis_oml_sendmsg(struct msgb *msg)
struct gsm_bts *bts = msg->trx->bts;
if (!bts->oml_link) {
- llist_add_tail(&msg->list, &bts->oml_queue);
+ LOGP(DABIS, LOGL_INFO, "Drop Tx OML msg, OML link is down\n");
return 0;
- } else {
- /* osmo-bts uses msg->trx internally, but libosmo-abis uses
- * the signalling link at msg->dst */
- msg->dst = bts->oml_link;
- return abis_sendmsg(msg);
}
+
+ /* osmo-bts uses msg->trx internally, but libosmo-abis uses
+ * the signalling link at msg->dst */
+ msg->dst = bts->oml_link;
+ return abis_sendmsg(msg);
}
int abis_bts_rsl_sendmsg(struct msgb *msg)
diff --git a/src/common/bts.c b/src/common/bts.c
index 05584aa3..67e67367 100644
--- a/src/common/bts.c
+++ b/src/common/bts.c
@@ -407,7 +407,6 @@ int bts_init(struct gsm_bts *bts)
bts->smscb_queue_tgt_len = 2;
bts->smscb_queue_hyst = 2;
- INIT_LLIST_HEAD(&bts->oml_queue);
INIT_LLIST_HEAD(&bts->bsc_oml_hosts);
/* register DTX DL FSM */