aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAravind Sirsikar <Arvind.sirsikar@radisys.com>2016-05-19 21:14:32 +0530
committerAravind Sirsikar <Arvind.sirsikar@radisys.com>2016-05-19 21:14:32 +0530
commitf666f9585de25a90c1299e0e5c8edc3a34ff6627 (patch)
tree9235c2f17e148604d9e3e39d15268e48c19d26e8
parent7b01c15b6cfda078756ef108d7e91f57e8fe0f80 (diff)
Modify DL tbf flow for ARQ-II in EGPRS DL Retx
Modify the DL TBF flow to support ARQ-II EGPRS DL retransmission
-rw-r--r--src/tbf_dl.cpp46
1 files changed, 34 insertions, 12 deletions
diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index 9e4d078..eae6968 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -365,7 +365,7 @@ int gprs_rlcmac_dl_tbf::take_next_bsn(uint32_t fn,
bsn = m_window.resend_needed();
if (previous_bsn >= 0) {
- force_cs = m_rlc.block(previous_bsn)->cs;
+ 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;
@@ -379,7 +379,27 @@ int gprs_rlcmac_dl_tbf::take_next_bsn(uint32_t fn,
m_window.mod_sns(bsn - previous_bsn) > RLC_EGPRS_MAX_BSN_DELTA)
return -1;
- cs2 = m_rlc.block(bsn)->cs;
+ if (is_egprs_enabled()) {
+ m_rlc.block(bsn)->cs_current_trans =
+ GprsCodingScheme::get_retx_mcs(
+ m_rlc.block(bsn)->cs, ms()->current_cs_dl());
+
+ LOGP(DRLCMACDL, LOGL_DEBUG,
+ "- current_cs_dl(%d) demanded_mcs(%d) cs_trans(%d)\n",
+ m_rlc.block(bsn)->cs.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
+ */
+ if (m_rlc.block(bsn)->cs == GprsCodingScheme::MCS8)
+ m_rlc.block(bsn)->cs_current_trans =
+ GprsCodingScheme::MCS8;
+ } else
+ m_rlc.block(bsn)->cs_current_trans =
+ m_rlc.block(bsn)->cs;
+
data_len2 = m_rlc.block(bsn)->len;
if (force_data_len > 0 && force_data_len != data_len2)
return -1;
@@ -422,7 +442,7 @@ int gprs_rlcmac_dl_tbf::take_next_bsn(uint32_t fn,
"- 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) {
@@ -433,7 +453,7 @@ int gprs_rlcmac_dl_tbf::take_next_bsn(uint32_t fn,
bts->rlc_resent();
}
- *may_combine = cs2.numDataBlocks() > 1;
+ *may_combine = m_rlc.block(bsn)->cs_current_trans.numDataBlocks() > 1;
return bsn;
}
@@ -505,6 +525,7 @@ int gprs_rlcmac_dl_tbf::create_new_bsn(const uint32_t fn, GprsCodingScheme cs)
rlc_data = m_rlc.block(bsn);
data = rlc_data->prepare(block_data_len);
rlc_data->cs = cs;
+ rlc_data->cs_current_trans = cs;
rlc_data->len = block_data_len;
rdbi = &(rlc_data->block_info);
@@ -587,7 +608,6 @@ struct msgb *gprs_rlcmac_dl_tbf::create_dl_acked_block(
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)];
@@ -601,7 +621,7 @@ struct msgb *gprs_rlcmac_dl_tbf::create_dl_acked_block(
* be put into the data area, even if the resulting CS is higher than
* the current limit.
*/
- cs = m_rlc.block(index)->cs;
+ cs = m_rlc.block(index)->cs_current_trans;
bsns[0] = index;
num_bsns = 1;
@@ -613,6 +633,9 @@ struct msgb *gprs_rlcmac_dl_tbf::create_dl_acked_block(
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
+ */
if (cs != GprsCodingScheme(GprsCodingScheme::MCS8))
cs.decToSingleBlock(&need_padding);
}
@@ -647,18 +670,15 @@ struct msgb *gprs_rlcmac_dl_tbf::create_dl_acked_block(
else
bsn = bsns[0];
- cs_enc = m_rlc.block(bsn)->cs;
+ 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, cs);
if (cs.isEgprs()) {
OSMO_ASSERT(punct_scheme >= EGPRS_PS_1);
@@ -682,7 +702,9 @@ struct msgb *gprs_rlcmac_dl_tbf::create_dl_acked_block(
* in header type 1
*/
gprs_update_punct_scheme(&m_rlc.block(bsn)->next_ps,
- cs_current_trans);
+ cs);
+
+ m_rlc.block(bsn)->cs = cs;
rdbi->e = block_info->e;
rdbi->cv = block_info->cv;