diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2016-02-02 18:12:46 +0100 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2016-02-08 00:45:40 +0100 |
commit | d6752491e1facccf3cb022a6701532379a1f4e0c (patch) | |
tree | 0570cabe506535367fb71b2f2d9d1da064bdd0db /src/tbf.h | |
parent | be314d9a54578d1eb31ab84f5de9bc16f8e892e9 (diff) |
edge: Send a second BSN block in an RLC message if possible
Currently only one BSN block is encoded in each RLC data message,
even if MSC7-9 are used, which transport two independant (except for a
max BSN delta of 512) BSN blocks. In that case, the same block is
just put twice into the same message.
The current create_dl_acked_block(fn, ts) method handles
block selection (resend, new BSN, dummy block, ...) and restart
handling in one method and is too complex to extend it accordingly.
Therefore this commit move the block selection/creation handling into
a new method (take_next_bsn) which delivers the next BSN along with a
hint, whether it may be combined with another block. In that case,
the function can be called a second time (this time with a valid
previous BSN, that's the one returned by the first call) to get the
second BSN. The real block generation method
create_dl_acked_block(fn, ts, index, index2) is then called with both
BSNs as indices (the second must be -1, if there is only one BSN).
Note that every BSN returned by take_next_bsn should be passed to
create_dl_acked_block to avoid state inconsistencies.
Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/tbf.h')
-rw-r--r-- | src/tbf.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -406,7 +406,10 @@ protected: unsigned lost_bytes; }; - struct msgb *create_new_bsn(const uint32_t fn, const uint8_t ts); + int take_next_bsn(uint32_t fn, int previous_bsn, + GprsCodingScheme *next_cs); + bool restart_bsn_cycle(); + 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); |