aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-11-15 20:50:42 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-12-21 13:53:41 +0100
commit6f615551a402ea87843077e3d79d16251d53f078 (patch)
treeab0f8c242ccfb5d46ed54597529244fb0a81d3c1 /openbsc/include/openbsc
parent39e6ba09c2ef18b6b6cc19ca5a7982325f7c356c (diff)
abis_nm: Band aid on OML initialisation by queuing messages
Instead of sending many messages we will queue the OML messages and wait for the ACK/NACK before sending the next message from the queue. We tag the msgb to remember if we need to wait for an ack or not. We keep the order of all messages, on ACKs and similiar occassions we will drown the queue until we reach a message that needs to be acked and then wait for that ack again. Possible breakage can appear when we send an OML (e.g. BS11 specific message) msg which does not need to be acked through the abis_nm_sendmsg call. The fix will be to use the _direct version of this method. Re-Enable as it might have fixed something... who knows. Conflicts: openbsc/include/openbsc/abis_nm.h openbsc/include/openbsc/gsm_data.h openbsc/src/abis_nm.c openbsc/src/gsm_data.c
Diffstat (limited to 'openbsc/include/openbsc')
-rw-r--r--openbsc/include/openbsc/abis_nm.h3
-rw-r--r--openbsc/include/openbsc/gsm_data.h6
2 files changed, 9 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/abis_nm.h b/openbsc/include/openbsc/abis_nm.h
index 5c9cbd0d3..76e5f6e89 100644
--- a/openbsc/include/openbsc/abis_nm.h
+++ b/openbsc/include/openbsc/abis_nm.h
@@ -175,4 +175,7 @@ int nm_is_running(struct gsm_nm_state *s);
int abis_nm_vty_init(void);
+void abis_nm_clear_queue(struct gsm_bts *bts);
+
+
#endif /* _NM_H */
diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h
index 364eaf4f2..b73c4d1ee 100644
--- a/openbsc/include/openbsc/gsm_data.h
+++ b/openbsc/include/openbsc/gsm_data.h
@@ -91,6 +91,8 @@ enum bts_gprs_mode {
BTS_GPRS_EGPRS = 2,
};
+#define OBSC_NM_W_ACK_CB(__msgb) (__msgb)->cb[3]
+
/* the data structure stored in msgb->cb for openbsc apps */
struct openbsc_msgb_cb {
unsigned char *bssgph;
@@ -592,6 +594,10 @@ struct gsm_bts {
/* transceivers */
int num_trx;
struct llist_head trx_list;
+
+ /* Abis NM queue */
+ struct llist_head abis_queue;
+ int abis_nm_pend;
};
/* Some statistics of our network */