diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2018-06-16 17:20:13 +0200 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2018-07-28 12:18:23 +0200 |
commit | 149160f9f189cc001049e6a82c30286bf33ddb1b (patch) | |
tree | cdf4154a96952876cb1ab0a58aa315ad5ec548d8 /include/osmocom | |
parent | 3b5de1b6684f3a166bb4666ffabd31d6b29c0175 (diff) |
fix / clarify rsl dtap cache
In certain situations like handover or assignment, DTAP must not go out via RSL
directly but is cached to be submitted later. Make sure that all RSL DTAP
sending adheres to this:
gscon_submit_rsl_dtap() is the new "public" API to request an RSL DTAP to be
sent. Depending on the gscon's state, this ends up in the cache or is sent
directly. When caching, there is no way to tell whether sending will succeed or
not, so semantically it does not make sense to even return a result code. Just
return void. Change all "public" callers to gscon_submit_rsl_dtap().
Merge gsm0808_submit_dtap() and submit_dtap() guts to gsm0808_send_rsl_dtap(),
static in bsc_subscr_conn_fsm.c: directly send DTAP, assume a conn->lchan to be
present, or otherwise trigger a BSSMAP Clear Request.
The static submit_dtap() becomes a thin convenience wrapper.
Move ho_dtap_cache* functions to bsc_subscr_conn_fsm.c and rename to
gscon_dtap_cache_* -- they are not only for handover, also for assignment.
Function gsm0808_submit_dtap() m
Introduce function gscon_submit_rsl_dtap()
Change-Id: I6ffd7aa641c8905292c769400048c96aa0949585
Diffstat (limited to 'include/osmocom')
-rw-r--r-- | include/osmocom/bsc/bsc_subscr_conn_fsm.h | 5 | ||||
-rw-r--r-- | include/osmocom/bsc/gsm_data.h | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/include/osmocom/bsc/bsc_subscr_conn_fsm.h b/include/osmocom/bsc/bsc_subscr_conn_fsm.h index 9e56f6b47..70fce32a4 100644 --- a/include/osmocom/bsc/bsc_subscr_conn_fsm.h +++ b/include/osmocom/bsc/bsc_subscr_conn_fsm.h @@ -67,8 +67,13 @@ enum gscon_fsm_event { struct gsm_subscriber_connection; struct gsm_network; struct mgcp_conn_peer; +struct msgb; /* Allocate a subscriber connection and its associated FSM */ struct gsm_subscriber_connection *bsc_subscr_con_allocate(struct gsm_network *net); void bsc_subscr_pick_codec(struct mgcp_conn_peer *conn_peer, struct gsm_subscriber_connection *conn); + +void gscon_submit_rsl_dtap(struct gsm_subscriber_connection *conn, + struct msgb *msg, int link_id, int allow_sacch); +void gscon_dtap_queue_flush(struct gsm_subscriber_connection *conn, int send); diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index a16a4b743..287249382 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -119,9 +119,9 @@ struct gsm_subscriber_connection { /* buffer/cache for classmark of the ME of the subscriber */ struct gsm_classmark classmark; - /* Cache DTAP messages during handover/assignment (msgb_enqueue()/msgb_dequeue())*/ - struct llist_head ho_dtap_cache; - unsigned int ho_dtap_cache_len; + /* Queue DTAP messages during handover/assignment (msgb_enqueue()/msgb_dequeue())*/ + struct llist_head dtap_queue; + unsigned int dtap_queue_len; struct { int failures; |