laforge submitted this change.

View Change

Approvals: laforge: Looks good to me, approved osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified
bsc: fix race condition in RSLEm

It may happen that the RSLEm component receives a DChan message
earlier than we suspend the DChan processing. We saw this once:

RSL for unknown Dchan
BSC_Tests.ttcn:12769 BSC_Tests control part
BSC_Tests.ttcn:5888 TC_ho_int_a5_4 testcase

Let's guard against this by calling f_rslem_suspend() earlier.

Change-Id: I012d4db05538d294a6b4aa85be4a40bb0bad28a3
---
M bsc/BSC_Tests.ttcn
1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 1badaa5..ec1e983 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -5781,10 +5781,11 @@
old_chan_nr := -,
expect_target_tsc := c_BtsParams[1].tsc
};
- /* issue hand-over command on VTY, from BTS 0 to BTS 1 */
- f_vty_handover(BSCVTY, 0, 0, g_chan_nr, 1);
+
/* temporarily suspend DChan processing on BTS1 to avoid race with RSLEM_register */
f_rslem_suspend(RSL1_PROC);
+ /* issue hand-over command on VTY, from BTS 0 to BTS 1 */
+ f_vty_handover(BSCVTY, 0, 0, g_chan_nr, 1);

/* From the MGW perspective, a handover is is characterized by
* performing one MDCX operation with the MGW. So we expect to see
@@ -5906,10 +5907,11 @@
old_chan_nr := -,
expect_target_tsc := c_BtsParams[1].tsc
};
- /* issue hand-over command on VTY */
- f_vty_handover(BSCVTY, 0, 0, g_chan_nr, 1);
+
/* temporarily suspend DChan processing on BTS1 to avoid race with RSLEM_register */
f_rslem_suspend(RSL1_PROC);
+ /* issue hand-over command on VTY */
+ f_vty_handover(BSCVTY, 0, 0, g_chan_nr, 1);

/* From the MGW perspective, a handover is is characterized by
* performing one MDCX operation with the MGW. So we expect to see
@@ -10739,10 +10741,11 @@
old_chan_nr := -,
expect_target_tsc := c_BtsParams[1].tsc
};
- /* issue hand-over command on VTY */
- f_vty_handover(BSCVTY, 0, 0, g_chan_nr, 1);
+
/* temporarily suspend DChan processing on BTS1 to avoid race with RSLEM_register */
f_rslem_suspend(RSL1_PROC);
+ /* issue hand-over command on VTY */
+ f_vty_handover(BSCVTY, 0, 0, g_chan_nr, 1);

/* From the MGW perspective, a handover is is characterized by
* performing one MDCX operation with the MGW. So we expect to see

To view, visit change 40415. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I012d4db05538d294a6b4aa85be4a40bb0bad28a3
Gerrit-Change-Number: 40415
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: osmith <osmith@sysmocom.de>