[PATCH] osmo-pcu[master]: Modify DL tbf flow for ARQ-II in EGPRS DL Retx

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

arvind.sirsikar gerrit-no-reply at lists.osmocom.org
Tue Jul 12 10:08:12 UTC 2016


Hello Jenkins Builder, Holger Freyther,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/334

to look at the new patch set (#2).

Modify DL tbf flow for ARQ-II in EGPRS DL Retx

Modify the DL TBF flow to support ARQ-II EGPRS DL retransmission

Change-Id: I7a845c98f2018795f0f62240f228411b0bc030c7
---
M src/tbf_dl.cpp
M tests/tbf/TbfTest.err
2 files changed, 40 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/34/334/2

diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index 1ca9c4a..deb6f99 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -361,7 +361,7 @@
 	bsn = m_window.resend_needed();
 
 	if (previous_bsn >= 0) {
-		force_cs = m_rlc.block(previous_bsn)->cs_last;
+		force_cs = m_rlc.block(previous_bsn)->cs_current_trans;
 		if (!force_cs.isEgprs())
 			return -1;
 		force_data_len = m_rlc.block(previous_bsn)->len;
@@ -375,7 +375,29 @@
 			m_window.mod_sns(bsn - previous_bsn) > RLC_EGPRS_MAX_BSN_DELTA)
 			return -1;
 
-		cs2 = m_rlc.block(bsn)->cs_last;
+		 if (is_egprs_enabled()) {
+			m_rlc.block(bsn)->cs_current_trans =
+			GprsCodingScheme::get_retx_mcs(
+			m_rlc.block(bsn)->cs_last, ms()->current_cs_dl());
+
+			LOGP(DRLCMACDL, LOGL_DEBUG,
+			"- current_cs_dl(%d) demanded_mcs(%d) cs_trans(%d)\n",
+			m_rlc.block(bsn)->cs_last.to_num(),
+			ms()->current_cs_dl().to_num(),
+			m_rlc.block(bsn)->cs_current_trans.to_num());
+
+			/* TODO: Need to remove this check when MCS-8 -> MCS-6
+			 * transistion is handled.
+			 * Refer commit be881c028fc4da00c4046ecd9296727975c206a3
+			 * dated 2016-02-07 23:45:40 (UTC)
+			 */
+			if (m_rlc.block(bsn)->cs_last == GprsCodingScheme::MCS8)
+				m_rlc.block(bsn)->cs_current_trans =
+					GprsCodingScheme::MCS8;
+		} else
+			m_rlc.block(bsn)->cs_current_trans =
+					m_rlc.block(bsn)->cs_last;
+
 		data_len2 = m_rlc.block(bsn)->len;
 		if (force_data_len > 0 && force_data_len != data_len2)
 			return -1;
@@ -418,7 +440,7 @@
 			"- Sending new dummy block at BSN %d, CS=%s\n",
 			m_window.v_s(), current_cs().name());
 		bsn = create_new_bsn(fn, current_cs());
-		/* Don't send a second block, so don't set cs2 */
+		/* Don't send a second block, so don't set cs_current_trans */
 	}
 
 	if (bsn < 0) {
@@ -429,7 +451,7 @@
 		bts->rlc_resent();
 	}
 
-	*may_combine = cs2.numDataBlocks() > 1;
+	*may_combine = m_rlc.block(bsn)->cs_current_trans.numDataBlocks() > 1;
 
 	return bsn;
 }
@@ -501,6 +523,7 @@
 	rlc_data = m_rlc.block(bsn);
 	data = rlc_data->prepare(block_data_len);
 	rlc_data->cs_last = cs;
+	rlc_data->cs_current_trans = cs;
 	rlc_data->len = block_data_len;
 
 	rdbi = &(rlc_data->block_info);
@@ -590,7 +613,6 @@
 	bool is_final = false;
 	gprs_rlc_data_info rlc;
 	GprsCodingScheme cs;
-	GprsCodingScheme cs_current_trans;
 	int bsns[ARRAY_SIZE(rlc.block_info)];
 	unsigned num_bsns;
 	enum egprs_puncturing_values punct[ARRAY_SIZE(rlc.block_info)];
@@ -604,7 +626,7 @@
 	 * be put into the data area, even if the resulting CS is higher than
 	 * the current limit.
 	 */
-	cs = m_rlc.block(index)->cs_last;
+	cs = m_rlc.block(index)->cs_current_trans;
 	bsns[0] = index;
 	num_bsns = 1;
 
@@ -616,6 +638,11 @@
 	if (num_bsns == 1) {
 		/* TODO: remove the conditional when MCS-6 padding isn't
 		 * failing to be decoded by MEs anymore */
+		/* TODO: support of MCS-8 -> MCS-6 transition should be
+		 * handled
+		 * Refer commit be881c028fc4da00c4046ecd9296727975c206a3
+		 * dated 2016-02-07 23:45:40 (UTC)
+		 */
 		if (cs != GprsCodingScheme(GprsCodingScheme::MCS8))
 			cs.decToSingleBlock(&need_padding);
 	}
@@ -650,18 +677,14 @@
 		else
 			bsn = bsns[0];
 
-		cs_enc = m_rlc.block(bsn)->cs_last;
-
+		cs_enc = m_rlc.block(bsn)->cs_current_trans;
 		/* get data and header from current block */
 		block_data = m_rlc.block(bsn)->block;
-
-		/* TODO: Need to support MCS change during retx */
-		cs_current_trans = cs;
 
 		/* Get current puncturing scheme from block */
 		punct_scheme = gprs_get_punct_scheme(
 			m_rlc.block(bsn)->next_ps,
-			cs, cs_current_trans);
+			m_rlc.block(bsn)->cs_last, cs);
 
 		if (cs.isEgprs()) {
 			OSMO_ASSERT(punct_scheme >= EGPRS_PS_1);
@@ -685,8 +708,9 @@
 		 * in header type 1
 		 */
 		gprs_update_punct_scheme(&m_rlc.block(bsn)->next_ps,
-					cs_current_trans);
+					cs);
 
+		m_rlc.block(bsn)->cs_last = cs;
 		rdbi->e   = block_info->e;
 		rdbi->cv  = block_info->cv;
 		rdbi->bsn = bsn;
diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err
index 4e83ce2..6f38de7 100644
--- a/tests/tbf/TbfTest.err
+++ b/tests/tbf/TbfTest.err
@@ -4746,6 +4746,7 @@
 Received RTS for PDCH: TRX=0 TS=4 FN=8 block_nr=2 scheduling free USF for polling at FN=13 of TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS)
 Scheduling data message at RTS for DL TFI=0 (TRX=0, TS=4) prio=3
 TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink (V(A)==0 .. V(S)==1)
+- current_cs_dl(5) demanded_mcs(7) cs_trans(7)
 - Resending BSN 0
 - Sending new block at BSN 1, CS=MCS-7
 - Dequeue next LLC for TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) (len=512)
@@ -4895,6 +4896,7 @@
 Received RTS for PDCH: TRX=0 TS=4 FN=8 block_nr=2 scheduling free USF for polling at FN=13 of TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS)
 Scheduling data message at RTS for DL TFI=0 (TRX=0, TS=4) prio=3
 TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink (V(A)==0 .. V(S)==1)
+- current_cs_dl(8) demanded_mcs(8) cs_trans(8)
 - Resending BSN 0
 - Sending new block at BSN 1, CS=MCS-8
 - Dequeue next LLC for TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) (len=512)
@@ -5030,6 +5032,7 @@
 Received RTS for PDCH: TRX=0 TS=4 FN=8 block_nr=2 scheduling free USF for polling at FN=13 of TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS)
 Scheduling data message at RTS for DL TFI=0 (TRX=0, TS=4) prio=3
 TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink (V(A)==0 .. V(S)==1)
+- current_cs_dl(6) demanded_mcs(9) cs_trans(9)
 - Resending BSN 0
 - Sending new block at BSN 1, CS=MCS-9
 - Dequeue next LLC for TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) (len=512)

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I7a845c98f2018795f0f62240f228411b0bc030c7
Gerrit-PatchSet: 2
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: arvind.sirsikar <arvind.sirsikar at radisys.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arvind.sirsikar <arvind.sirsikar at radisys.com>



More information about the gerrit-log mailing list