aboutsummaryrefslogtreecommitdiffstats
path: root/src/llc.h
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-03-20 12:02:42 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-04-02 12:34:48 +0200
commit0c1c8778dfdda80222d30b903d62156adb6927c4 (patch)
tree73f8446ef4e95d8aa0085d3059b03d1139d069eb /src/llc.h
parent0a0b5dcb324d3652f55541855426c91f0c9d9536 (diff)
tbf: Use a hysteresis when discarding DL LLC frames
Currently single LLC blocks are discarded when the PDU lifetime expires. If an IP packet has been fragmented either on the IP or on the LLC layer and is therefore distributed over several LLC frames, the kept fragments are transmitted and then discarded by the MS because of the missing PDU. This can cause massive IP packet loss when there are many fragmented packets (e.g. when trying 'ping -s1800' or if the GGSN chops downlink IP packets into several SNDCP packets). On the other hand, discarding too many packets might disturb the congestion handling of TCP. Dropping plain TCP ACKs might also hinder flow control and congestion avoidance. This commit adds a hysteresis algorithm to the LLC discard loop. If an LLC message's age reaches the high water mark, further message's with an age above the low water mark are discarded, too. This is aborted, if a GMM, a non-UI, or a small message is detected. In these cases, that message is kept. The following VTY commands are added (pcu config node): - queue hysteresis <1-65535> set the difference between high (lifetime) and low watermark in centiseconds - no queue hysteresis disable this feature (default) Since the SGSN will most probably send all fragments of a single N-PDU without much delay between them, a value slightly above the average transmission delay jitter between SGSN and PCU is probably a sensible value to discard all fragments of a single IP packet. This is an experimental feature that might be replaced by more advanced means of active queue management in the future. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/llc.h')
-rw-r--r--src/llc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/llc.h b/src/llc.h
index f82c4ed0..11a0c7ed 100644
--- a/src/llc.h
+++ b/src/llc.h
@@ -29,6 +29,7 @@
struct gprs_llc {
static void calc_pdu_lifetime(BTS *bts, const uint16_t pdu_delay_csec, struct timeval *tv);
static bool is_frame_expired(struct timeval *now, struct timeval *tv);
+ static bool is_user_data_frame(uint8_t *data, size_t len);
void init();
void reset();