summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-09-22 14:11:44 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2021-09-22 14:36:35 +0200
commitcf2ada57ccdea21804a41c2eb8911afa605dee8d (patch)
treec39b049630d71f2698de30aa8af8dccf6672fd18
parentf04762d48d32a4c5b1d25b5dfa52d0cea3f80556 (diff)
pcu: Allow empty rlcmac blocks in data_req
They are used by osmo-pcu to signal idle blocks. Change-Id: Ied6b133be5bfd181f08c445b76af0f570edfd2a4
-rw-r--r--pcu/GPRS_Components.ttcn8
-rw-r--r--pcu/PCUIF_Components.ttcn16
2 files changed, 19 insertions, 5 deletions
diff --git a/pcu/GPRS_Components.ttcn b/pcu/GPRS_Components.ttcn
index 4446b63b..10144985 100644
--- a/pcu/GPRS_Components.ttcn
+++ b/pcu/GPRS_Components.ttcn
@@ -1094,7 +1094,7 @@ runs on MS_BTS_IFACE_CT {
arfcn := f_trxnr2arfcn(valueof(nr.trx_nr)), block_nr := nr.blk_nr));
BTS.receive(tr_PCUIF_DATA_PDTCH(nr.bts_nr,
- tr_PCUIF_DATA(nr.trx_nr, nr.ts_nr, sapi := PCU_IF_SAPI_PDTCH))
+ tr_PCUIF_DATA(nr.trx_nr, nr.ts_nr, sapi := PCU_IF_SAPI_PDTCH), *)
) -> value data_msg;
}
@@ -1138,6 +1138,12 @@ function f_rx_rlcmac_dl_block(out RlcmacDlBlock dl_block, out uint32_t dl_fn,
runs on MS_BTS_IFACE_CT {
var BTS_PDTCH_Block data_msg;
f_pcuif_rx_data_req_pdtch(data_msg, nr := nr);
+
+ if (data_msg.dl_block == omit) {
+ setverdict(fail, "Expected RLCMAC block but received idle block (", data_msg.raw.len, ")");
+ f_shutdown(__BFILE__, __LINE__);
+ }
+
dl_block := data_msg.dl_block;
dl_fn := data_msg.raw.fn;
diff --git a/pcu/PCUIF_Components.ttcn b/pcu/PCUIF_Components.ttcn
index 66b2e21d..30982daf 100644
--- a/pcu/PCUIF_Components.ttcn
+++ b/pcu/PCUIF_Components.ttcn
@@ -133,12 +133,12 @@ template RAW_PCU_Command tr_RAW_PCU_CMD(template RAW_PCU_CommandType cmd := ?,
type record BTS_PDTCH_Block {
uint8_t bts_nr,
PCUIF_data raw,
- RlcmacDlBlock dl_block
+ RlcmacDlBlock dl_block optional
};
type record BTS_PTCCH_Block {
uint8_t bts_nr,
PCUIF_data raw,
- PTCCHDownlinkMsg dl_block
+ PTCCHDownlinkMsg dl_block optional
};
type record BTS_CCCH_Block {
uint8_t bts_nr,
@@ -554,14 +554,22 @@ runs on RAW_PCU_BTS_CT {
[decode_data_req] PCUIF.receive(tr_PCUIF_DATA_REQ(bts_nr, ?, ?, sapi := PCU_IF_SAPI_PDTCH)) -> value pcu_msg {
pcu_msg_pdtch.bts_nr := bts_nr;
pcu_msg_pdtch.raw := pcu_msg.u.data_req;
- pcu_msg_pdtch.dl_block := dec_RlcmacDlBlock(pcu_msg_pdtch.raw.data);
+ if (pcu_msg_pdtch.raw.len != 0) {
+ pcu_msg_pdtch.dl_block := dec_RlcmacDlBlock(pcu_msg_pdtch.raw.data);
+ } else {
+ pcu_msg_pdtch.dl_block := omit;
+ }
TC.send(pcu_msg_pdtch);
repeat;
}
[decode_data_req] PCUIF.receive(tr_PCUIF_DATA_REQ(bts_nr, ?, ?, sapi := PCU_IF_SAPI_PTCCH)) -> value pcu_msg {
pcu_msg_ptcch.bts_nr := bts_nr;
pcu_msg_ptcch.raw := pcu_msg.u.data_req;
- pcu_msg_ptcch.dl_block := dec_PTCCHDownlinkMsg(pcu_msg_ptcch.raw.data);
+ if (pcu_msg_ptcch.raw.len != 0) {
+ pcu_msg_ptcch.dl_block := dec_PTCCHDownlinkMsg(pcu_msg_ptcch.raw.data);
+ } else {
+ pcu_msg_ptcch.dl_block := omit;
+ }
TC.send(pcu_msg_ptcch);
repeat;
}