diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2016-02-09 22:27:45 +0100 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2016-02-09 22:56:11 +0100 |
commit | 308c8610540acfeffe7f5dad759cbfe35e65d3c8 (patch) | |
tree | 6b51a9f133329ed1c62986befdfd34be1c0d0228 /src | |
parent | 7f28c97fcc87d2ce773a2ae91579a84b40d12539 (diff) |
edge: Remove GPRS RBB based window handling methods
These methods have been replaced and are no longer used since the
commit "edge: Use bitvec based window methods for EGPRS", with the
only exception of TbfTest.cpp.
Remove the methods and update TbfTest.cpp by using the bitvec based
methods instead.
Sponsored-by: On-Waves ehf
Diffstat (limited to 'src')
-rw-r--r-- | src/rlc.cpp | 24 | ||||
-rw-r--r-- | src/rlc.h | 2 | ||||
-rw-r--r-- | src/tbf.h | 2 | ||||
-rw-r--r-- | src/tbf_dl.cpp | 76 |
4 files changed, 0 insertions, 104 deletions
diff --git a/src/rlc.cpp b/src/rlc.cpp index 79d8f48a..acfa7a24 100644 --- a/src/rlc.cpp +++ b/src/rlc.cpp @@ -129,30 +129,6 @@ void gprs_rlc_dl_window::update(BTS *bts, const struct bitvec *rbb, } } -void gprs_rlc_dl_window::update(BTS *bts, char *show_rbb, uint16_t ssn, - uint16_t *lost, uint16_t *received) -{ - /* SSN - 1 is in range V(A)..V(S)-1 */ - for (int bitpos = 0; bitpos < ws(); bitpos++) { - uint16_t bsn = mod_sns(bitnum_to_bsn(bitpos, ssn)); - - if (bsn == mod_sns(v_a() - 1)) - break; - - if (show_rbb[ws() - 1 - bitpos] == 'R') { - LOGP(DRLCMACDL, LOGL_DEBUG, "- got ack for BSN=%d\n", bsn); - if (!m_v_b.is_acked(bsn)) - *received += 1; - m_v_b.mark_acked(bsn); - } else { - LOGP(DRLCMACDL, LOGL_DEBUG, "- got NACK for BSN=%d\n", bsn); - m_v_b.mark_nacked(bsn); - bts->rlc_nacked(); - *lost += 1; - } - } -} - int gprs_rlc_dl_window::move_window() { int i; @@ -190,8 +190,6 @@ struct gprs_rlc_dl_window: public gprs_rlc_window { /* Methods to manage reception */ int resend_needed(); int mark_for_resend(); - void update(BTS *bts, char *show_rbb, uint16_t ssn, - uint16_t *lost, uint16_t *received); void update(BTS *bts, const struct bitvec *rbb, uint16_t first_bsn, uint16_t *lost, uint16_t *received); @@ -360,7 +360,6 @@ struct gprs_rlcmac_dl_tbf : public gprs_rlcmac_tbf { const uint16_t pdu_delay_csec, const uint8_t *data, const uint16_t len); - int rcvd_dl_ack(uint8_t final, uint8_t ssn, uint8_t *rbb); int rcvd_dl_ack(uint8_t final_ack, unsigned first_bsn, struct bitvec *rbb); struct msgb *create_dl_acked_block(uint32_t fn, uint8_t ts); void request_dl_ack(); @@ -412,7 +411,6 @@ protected: int create_new_bsn(const uint32_t fn, GprsCodingScheme cs); struct msgb *create_dl_acked_block(const uint32_t fn, const uint8_t ts, int index, int index2 = -1); - int update_window(const uint8_t ssn, const uint8_t *rbb); int update_window(unsigned first_bsn, const struct bitvec *rbb); int maybe_start_new_window(); bool dl_window_stalled() const; diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 7540d1b3..57346edb 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -898,71 +898,6 @@ int gprs_rlcmac_dl_tbf::update_window(unsigned first_bsn, return 0; } -int gprs_rlcmac_dl_tbf::update_window(const uint8_t ssn, const uint8_t *rbb) -{ - int16_t dist; /* must be signed */ - uint16_t lost = 0, received = 0; - char show_rbb[65]; - char show_v_b[RLC_MAX_SNS + 1]; - int error_rate; - struct ana_result ana_res; - - Decoding::extract_rbb(rbb, show_rbb); - /* show received array in debug (bit 64..1) */ - LOGP(DRLCMACDL, LOGL_DEBUG, "- ack: (BSN=%d)\"%s\"" - "(BSN=%d) R=ACK I=NACK\n", m_window.mod_sns(ssn - 64), - show_rbb, m_window.mod_sns(ssn - 1)); - - /* apply received array to receive state (SSN-64..SSN-1) */ - /* calculate distance of ssn from V(S) */ - dist = m_window.mod_sns(m_window.v_s() - ssn); - /* check if distance is less than distance V(A)..V(S) */ - if (dist >= m_window.distance()) { - /* this might happpen, if the downlink assignment - * was not received by ms and the ack refers - * to previous TBF - * FIXME: we should implement polling for - * control ack!*/ - LOGP(DRLCMACDL, LOGL_NOTICE, "- ack range is out of " - "V(A)..V(S) range %s Free TBF!\n", tbf_name(this)); - return 1; /* indicate to free TBF */ - } - - error_rate = analyse_errors(show_rbb, ssn, &ana_res); - - if (bts_data()->cs_adj_enabled && ms()) - ms()->update_error_rate(this, error_rate); - - m_window.update(bts, show_rbb, ssn, - &lost, &received); - - /* report lost and received packets */ - gprs_rlcmac_received_lost(this, received, lost); - - /* Used to measure the leak rate */ - gprs_bssgp_update_bytes_received(ana_res.received_bytes, - ana_res.received_packets + ana_res.lost_packets); - - /* raise V(A), if possible */ - m_window.raise(m_window.move_window()); - - /* show receive state array in debug (V(A)..V(S)-1) */ - m_window.show_state(show_v_b); - LOGP(DRLCMACDL, LOGL_DEBUG, "- V(B): (V(A)=%d)\"%s\"" - "(V(S)-1=%d) A=Acked N=Nacked U=Unacked " - "X=Resend-Unacked I=Invalid\n", - m_window.v_a(), show_v_b, - m_window.v_s_mod(-1)); - - if (state_is(GPRS_RLCMAC_FINISHED) && m_window.window_empty()) { - LOGP(DRLCMACDL, LOGL_NOTICE, "Received acknowledge of " - "all blocks, but without final ack " - "inidcation (don't worry)\n"); - } - return 0; -} - - int gprs_rlcmac_dl_tbf::maybe_start_new_window() { release(); @@ -1052,17 +987,6 @@ int gprs_rlcmac_dl_tbf::rcvd_dl_ack(uint8_t final_ack, unsigned first_bsn, return rc; } -int gprs_rlcmac_dl_tbf::rcvd_dl_ack(uint8_t final_ack, uint8_t ssn, uint8_t *rbb) -{ - LOGP(DRLCMACDL, LOGL_DEBUG, "%s downlink acknowledge\n", tbf_name(this)); - - if (!final_ack) - return update_window(ssn, rbb); - - LOGP(DRLCMACDL, LOGL_DEBUG, "- Final ACK received.\n"); - return maybe_start_new_window(); -} - bool gprs_rlcmac_dl_tbf::dl_window_stalled() const { return m_window.window_stalled(); |