aboutsummaryrefslogtreecommitdiffstats
path: root/src/rlc.h
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2016-02-02 18:12:46 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2016-02-08 00:45:40 +0100
commitd6752491e1facccf3cb022a6701532379a1f4e0c (patch)
tree0570cabe506535367fb71b2f2d9d1da064bdd0db /src/rlc.h
parentbe314d9a54578d1eb31ab84f5de9bc16f8e892e9 (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/rlc.h')
-rw-r--r--src/rlc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/rlc.h b/src/rlc.h
index 28913bd0..54f28dfd 100644
--- a/src/rlc.h
+++ b/src/rlc.h
@@ -31,6 +31,7 @@
#define RLC_EGPRS_MIN_WS 64 /* min window size */
#define RLC_EGPRS_MAX_WS 1024 /* min window size */
#define RLC_EGPRS_SNS 2048 /* EGPRS, must be power of 2 */
+#define RLC_EGPRS_MAX_BSN_DELTA 512
#define RLC_MAX_SNS RLC_EGPRS_SNS
#define RLC_MAX_WS RLC_EGPRS_MAX_WS
#define RLC_MAX_LEN 74 /* MCS-9 data unit */