Review at  https://gerrit.osmocom.org/6875

RSL: Implement DELETE INDICATION on AGCH overflow

This patch adds generation of a DELETE INDICATION when the BTS AGCH
queue overflows due to too many IMMEDIATE ASSIGN CMDs, as required
by the specs.

The AGCH queue length in OsmoBTS so far is at 1000 entries, which I
consider way too high.  But that is for another patch.

Change-Id: Ied3306e85cbdc6f3476b10dc4bb0463cd728b274
Related: OS#2990
---
M src/common/rsl.c
1 file changed, 17 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/75/6875/1

diff --git a/src/common/rsl.c b/src/common/rsl.c
index 8448925..2638ad2 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -404,6 +404,21 @@
        return abis_bts_rsl_sendmsg(msg);
 }
 
+/* 8.5.4 DELETE INDICATION */
+static int rsl_tx_delete_ind(struct gsm_bts *bts, const uint8_t *ia, uint8_t 
ia_len)
+{
+       struct msgb *msg;
+
+       msg = rsl_msgb_alloc(sizeof(struct abis_rsl_cchan_hdr));
+       if (!msg)
+               return -ENOMEM;
+       rsl_cch_push_hdr(msg, RSL_MT_DELETE_IND, RSL_CHAN_PCH_AGCH);
+       msgb_tlv_put(msg, RSL_IE_FULL_IMM_ASS_INFO, ia_len, ia);
+       msg->trx = bts->c0;
+
+       return abis_bts_rsl_sendmsg(msg);
+}
+
 /* 8.5.5 PAGING COMMAND */
 static int rsl_rx_paging_cmd(struct gsm_bts_trx *trx, struct msgb *msg)
 {
@@ -546,6 +561,8 @@
        /* put into the AGCH queue of the BTS */
        if (bts_agch_enqueue(trx->bts, msg) < 0) {
                /* if there is no space in the queue: send DELETE IND */
+               rsl_tx_delete_ind(trx->bts, TLVP_VAL(&tp, 
RSL_IE_FULL_IMM_ASS_INFO),
+                                 TLVP_LEN(&tp, RSL_IE_FULL_IMM_ASS_INFO));
                msgb_free(msg);
        }
 

-- 
To view, visit https://gerrit.osmocom.org/6875
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ied3306e85cbdc6f3476b10dc4bb0463cd728b274
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <lafo...@gnumonks.org>

Reply via email to