aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-06-23 10:49:27 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-06-23 10:53:28 +0800
commita68f139820ea02c05ff64e265084c1dda8c7ea3a (patch)
treea3c4529f1ec6e254f81e9ada43a6e8a7f290e0a8 /openbsc/include
parent539b8ed99f5f227ffd5d783ba3c7a38b26fb1760 (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. Conflicts: openbsc/include/openbsc/abis_nm.h openbsc/include/openbsc/gsm_data.h openbsc/src/gsm_data.c openbsc/src/input/ipaccess.c
Diffstat (limited to 'openbsc/include')
-rw-r--r--openbsc/include/openbsc/abis_nm.h2
-rw-r--r--openbsc/include/openbsc/gsm_data.h5
2 files changed, 7 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/abis_nm.h b/openbsc/include/openbsc/abis_nm.h
index c20e4e172..79d27301d 100644
--- a/openbsc/include/openbsc/abis_nm.h
+++ b/openbsc/include/openbsc/abis_nm.h
@@ -170,4 +170,6 @@ int nm_state_event(enum nm_evt evt, u_int8_t obj_class, void *obj,
const char *nm_opstate_name(u_int8_t os);
const char *nm_avail_name(u_int8_t avail);
int nm_is_running(struct gsm_nm_state *s);
+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 9e9dc6d52..9cf03efa9 100644
--- a/openbsc/include/openbsc/gsm_data.h
+++ b/openbsc/include/openbsc/gsm_data.h
@@ -81,6 +81,7 @@ enum bts_gprs_mode {
BTS_GPRS_EGPRS = 2,
};
+#define OBSC_NM_W_ACK_CB(__msgb) (__msgb)->cb[3]
struct msgb;
typedef int gsm_cbfn(unsigned int hooknum,
unsigned int event,
@@ -540,6 +541,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 */