summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2013-01-27 15:58:53 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2013-01-27 16:00:25 +0100
commit01dd7908da9c8cf9382ced1c582d247973b445b8 (patch)
treebd410718e8769637d9c6a892640ee13310d91679
parent49e06653b3d2f29c2d7d085c8d2aad57f27baeb3 (diff)
Modify osmo-nitb for load testing a BTSzecke/features/bts-load-testing
* Send Modify requests during release * Send multiple SACCH deactivates * Optionally do not send IMM.ASSIGNMENT during channel granting to force the phone to send multiple RACH bursts.. * abort() when a channel goes broken
-rw-r--r--openbsc/src/libbsc/abis_rsl.c21
-rw-r--r--openbsc/src/libbsc/chan_alloc.c4
2 files changed, 21 insertions, 4 deletions
diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c
index 977ea3f7e..26b34505d 100644
--- a/openbsc/src/libbsc/abis_rsl.c
+++ b/openbsc/src/libbsc/abis_rsl.c
@@ -209,6 +209,7 @@ static void lchan_deact_tmr_cb(void *data)
LOGP(DRSL, LOGL_ERROR, "%s Timeout during deactivation!\n",
gsm_lchan_name(lchan));
+ abort();
do_lchan_free(lchan);
}
@@ -697,8 +698,10 @@ static int rsl_rf_chan_release(struct gsm_lchan *lchan, int error,
/*
* sacch de-activate and "local end release"
*/
- if (deact_sacch == SACCH_DEACTIVATE && !lchan->sacch_deact)
+ if (deact_sacch == SACCH_DEACTIVATE) {
rsl_deact_sacch(lchan);
+ rsl_deact_sacch(lchan);
+ }
rsl_release_sapis_from(lchan, 0, RSL_REL_LOCAL_END);
/*
@@ -946,13 +949,17 @@ static int rsl_rx_chan_act_nack(struct msgb *msg)
print_rsl_cause(LOGL_ERROR, cause,
TLVP_LEN(&tp, RSL_IE_CAUSE));
msg->lchan->error_cause = *cause;
- if (*cause != RSL_ERR_RCH_ALR_ACTV_ALLOC)
+ if (*cause != RSL_ERR_RCH_ALR_ACTV_ALLOC) {
rsl_lchan_set_state(msg->lchan, LCHAN_S_BROKEN);
+ abort();
+ }
else
rsl_rf_chan_release(msg->lchan, 1, SACCH_DEACTIVATE);
- } else
+ } else {
+ abort();
rsl_lchan_set_state(msg->lchan, LCHAN_S_BROKEN);
+ }
LOGPC(DRSL, LOGL_ERROR, "\n");
@@ -1449,6 +1456,13 @@ static int rsl_send_imm_assignment(struct gsm_lchan *lchan)
lchan->T3101.data = lchan;
osmo_timer_schedule(&lchan->T3101, bts->network->T3101, 0);
+#if 0
+ if (lchan->type == GSM_LCHAN_TCH_F && lchan->ts->nr >= 0 && lchan->ts->nr <= 6) {
+ printf("Just not sending the immediate assignment..\n");
+ return 0;
+ }
+#endif
+
/* send IMMEDIATE ASSIGN CMD on RSL to BTS (to send on CCCH to MS) */
return rsl_imm_assign_cmd(bts, sizeof(*ia)+ia->mob_alloc_len, (uint8_t *) ia);
}
@@ -2131,6 +2145,7 @@ int rsl_release_sapis_from(struct gsm_lchan *lchan, int start,
link_id = sapi;
if (lchan->type == GSM_LCHAN_TCH_F || lchan->type == GSM_LCHAN_TCH_H)
link_id |= 0x40;
+ rsl_deact_sacch(lchan);
rsl_release_request(lchan, link_id, release_mode);
no_sapi = 0;
}
diff --git a/openbsc/src/libbsc/chan_alloc.c b/openbsc/src/libbsc/chan_alloc.c
index 99c93604d..5c0a36b6f 100644
--- a/openbsc/src/libbsc/chan_alloc.c
+++ b/openbsc/src/libbsc/chan_alloc.c
@@ -300,7 +300,6 @@ void lchan_free(struct gsm_lchan *lchan)
sig.type = lchan->type;
lchan->type = GSM_LCHAN_NONE;
-
if (lchan->conn) {
struct lchan_signal_data sig;
@@ -396,7 +395,10 @@ static void _lchan_handle_release(struct gsm_lchan *lchan,
"%s sacch already deactivated?!\n",
gsm_lchan_name(lchan));
lchan->sacch_deact = 1;
+ rsl_chan_mode_modify_req(lchan);
+ rsl_deact_sacch(lchan);
rsl_deact_sacch(lchan);
+ rsl_chan_mode_modify_req(lchan);
rsl_start_t3109(lchan);
} else if (lchan->sapis[0] == LCHAN_SAPI_UNUSED) {
rsl_direct_rf_release(lchan);