Attention is currently required from: Hoernchen.
lynxis lazus has posted comments on this change by Hoernchen. ( https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39431?usp=email )
Change subject: gitgnore
......................................................................
Patch Set 3:
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39431/comment/64ba4809_a983a8b… :
PS3, Line 7: gitgnore
typo. Also it would be great to have a little bit more context. e.g. "gitignore: gcc cache files" or gitignore: compile artifacts.
--
To view, visit https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39431?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-asf4-dfu
Gerrit-Branch: master
Gerrit-Change-Id: I95af162a01fb35656e0f9ccc9ce46b59a15c8c34
Gerrit-Change-Number: 39431
Gerrit-PatchSet: 3
Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 11 Feb 2025 16:51:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39499?usp=email )
Change subject: pcu: Fix TC_dl_cs1_to_cs4 sporadic fail
......................................................................
pcu: Fix TC_dl_cs1_to_cs4 sporadic fail
The test TC_dl_cs1_to_cs4 failed sporadically in ttcn3-pcu-test-asan.
Due to how the DL data arriving at Gb is split in chunks over RLC/MAC
(also based on how CS changes over time), it may happen that the full
PDU content doesn't finish at the exact block number where PCU expects
the DL ACK/NACK. As a result, since PCU delays finishing the DL TBF and
some data for that DL TBF has already not been ACKed (and since there's
no more active DL TBFs), it will decide to retransmit some of the
RLC/MAC blocks which haven't been yet ACKed, instead of transmitting
nothing.
This is an optimization to increase the probabilities the MS has
received all the data.
We need to account for this possibility in f_dl_data_exp_cs(), used in
the mentioned test. In there, it needs to be checked whether the
received DL data block is a retransmission, and use that knowledge to
resolve that all data has been transmitted and hence the final condition
can be checked.
Change-Id: I7fb40689547645adf1d54f43c263161be1d7a440
---
M pcu/GPRS_Components.ttcn
M pcu/PCU_Tests.ttcn
2 files changed, 72 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/99/39499/1
diff --git a/pcu/GPRS_Components.ttcn b/pcu/GPRS_Components.ttcn
index cf8ef5f..c48497a 100644
--- a/pcu/GPRS_Components.ttcn
+++ b/pcu/GPRS_Components.ttcn
@@ -439,6 +439,17 @@
return n;
}
+function f_dltbf_bsn_is_retrans(inout DlTbf dl_tbf, RlcmacDlBlock dl_block)
+runs on MS_BTS_IFACE_CT return boolean {
+ var boolean is_egprs := ischosen(dl_block.data_egprs);
+ var uint11_t bsn := f_rlcmac_dl_block_get_bsn(dl_block);
+ if (is_egprs) {
+ return f_egprs_acknackdesc_bsn_is_retrans(dl_tbf.egprs_acknack_desc, bsn);
+ } else {
+ return f_acknackdesc_bsn_is_retrans(dl_tbf.acknack_desc, bsn);
+ }
+}
+
function f_dltbf_ack_block(inout DlTbf dl_tbf, RlcmacDlBlock dl_block, BIT1 final_ack := '0'B)
runs on MS_BTS_IFACE_CT {
var boolean is_egprs := ischosen(dl_block.data_egprs);
@@ -796,6 +807,36 @@
return CS_1; /* make compiler happy */
}
+function f_rlcmac_dl_block_get_bsn(RlcmacDlBlock dl_block)
+runs on MS_BTS_IFACE_CT return uint11_t {
+ if (ischosen(dl_block.data_egprs)) {
+ return dl_block.data_egprs.mac_hdr.bsn1;
+ }
+ if (ischosen(dl_block.data)) {
+ return dl_block.data.mac_hdr.hdr_ext.bsn;
+ }
+ setverdict(fail, "DlBlock doesn't contain BSN information:", dl_block);
+ f_shutdown(__BFILE__, __LINE__);
+ return 0; /* make compiler happy */
+}
+
+/* Check whether a given BSN is a retransmission in the not yet ACKed Tx window. */
+function f_acknackdesc_bsn_is_retrans(inout AckNackDescription desc, uint7_t bsn) return boolean
+{
+ var BIT1 received;
+ /* Filling hole? */
+ if (bsn < desc.starting_seq_nr) {
+ received := desc.receive_block_bitmap[lengthof(desc.receive_block_bitmap) - (desc.starting_seq_nr - bsn)];
+ return received == '1'B;
+ }
+ /* Filling hole, wraparound: */
+ if (bsn - desc.starting_seq_nr > lengthof(desc.receive_block_bitmap)) {
+ received := desc.receive_block_bitmap[lengthof(desc.receive_block_bitmap) - (desc.starting_seq_nr + (218 - bsn))];
+ return received == '1'B;
+ }
+ return false; /* make compiler happy */
+}
+
/* TS 44.060 sec 12.3 Ack/Nack Description */
function f_acknackdesc_ack_block(inout AckNackDescription desc, RlcmacDlBlock dl_block, BIT1 final_ack := '0'B)
{
@@ -832,6 +873,29 @@
desc.final_ack := final_ack;
}
+/* Check whether a given BSN is a retransmission in the not yet ACKed Tx window. */
+function f_egprs_acknackdesc_bsn_is_retrans(inout EgprsAckNackDescription desc, uint11_t bsn) return boolean
+{
+ var BIT1 received;
+ var integer inc;
+ var integer v_q := (desc.starting_seq_nr + 2047) mod 2048; /* SSN = V(Q) + 1 */
+
+
+ /* Repetition? */
+ if (bsn < v_q) {
+ /* Filling hole, wraparound: */
+ if (bsn - v_q > lengthof(desc.urbb)) {
+ received := desc.urbb[lengthof(desc.urbb) - (v_q + (2048 - bsn))];
+ return received == '1'B;
+ }
+ return true;
+ }
+
+ inc := bsn - v_q + 1;
+ received := desc.urbb[lengthof(desc.urbb) - inc];
+ return received == '1'B;
+}
+
/* TS 44.060 sec 12.3 Ack/Nack Description */
function f_egprs_acknackdesc_ack_block(inout EgprsAckNackDescription desc, RlcmacDlBlock dl_block, BIT1 final_ack := '0'B)
{
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 7aca712..f1f80db 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -1121,6 +1121,13 @@
break;
}
+ if (tx_data_remain == 0 and f_dltbf_bsn_is_retrans(ms.dl_tbf, dl_block)) {
+ /* If PCU already sent all data, it may happen that it retransmits data
+ * not yet ACKed before requesting an ACK after N transmissions. */
+ f_rlcmac_dl_block_exp_data(dl_block, ?, ?, exp_tmp_csmcs);
+ break;
+ }
+
f_rlcmac_dl_block_exp_data(dl_block, ?, bsn, exp_tmp_csmcs);
/* Keep Ack/Nack description updated */
@@ -1140,10 +1147,7 @@
f_rx_rlcmac_dl_block(dl_block, fn);
}
- bsn := (bsn + (bsn_mod-1)) mod bsn_mod; /* previous bsn: bsn -1 */
- f_rlcmac_dl_block_exp_data(prev_dl_block, ?, bsn, exp_final_cs);
-
-
+ f_rlcmac_dl_block_exp_data(prev_dl_block, ?, ?, exp_final_cs);
f_shutdown(__BFILE__, __LINE__, final := true);
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39499?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I7fb40689547645adf1d54f43c263161be1d7a440
Gerrit-Change-Number: 39499
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>