diff options
author | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2008-09-04 01:30:19 -0400 |
---|---|---|
committer | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2008-09-04 01:45:37 -0400 |
commit | e28fe59f9c82ef55fc9b55e745531c9fed86f00a (patch) | |
tree | 3b469804ebeb8e772c9f935015381706495cdd18 /net/dccp/ackvec.h | |
parent | 68b1de15765f2b0e0925e692dab2b2fa2abd93fc (diff) |
dccp ccid-2: Update code for the Ack Vector input/registration routine
This patch uupdates the code which registers new packets as received, using the
new circular buffer interface. It contributes a new algorithm which
* supports both tail/head pointers and buffer wrap-around and
* deals with overflow (head/tail move in lock-step).
The updated code is also partioned differently, into
1. dealing with the empty buffer,
2. adding new packets into non-empty buffer,
3. reserving space when encountering a `hole' in the sequence space,
4. updating old state and deciding when old state is irrelevant.
Protection against large burst losses: With regard to (3), it is too costly to
reserve space when there are large bursts of losses. When bursts get too large,
the code does no longer reserve space and just fills in cells normally. This
measure reduces space consumption by a factor of 63.
The code reuses in part the previous implementation by Arnaldo de Melo.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Diffstat (limited to 'net/dccp/ackvec.h')
-rw-r--r-- | net/dccp/ackvec.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/dccp/ackvec.h b/net/dccp/ackvec.h index b757e9b4110f..36ca2e9e5c84 100644 --- a/net/dccp/ackvec.h +++ b/net/dccp/ackvec.h | |||
@@ -29,6 +29,9 @@ | |||
29 | /* Estimated minimum average Ack Vector length - used for updating MPS */ | 29 | /* Estimated minimum average Ack Vector length - used for updating MPS */ |
30 | #define DCCPAV_MIN_OPTLEN 16 | 30 | #define DCCPAV_MIN_OPTLEN 16 |
31 | 31 | ||
32 | /* Threshold for coping with large bursts of losses */ | ||
33 | #define DCCPAV_BURST_THRESH (DCCPAV_MAX_ACKVEC_LEN / 8) | ||
34 | |||
32 | enum dccp_ackvec_states { | 35 | enum dccp_ackvec_states { |
33 | DCCPAV_RECEIVED = 0x00, | 36 | DCCPAV_RECEIVED = 0x00, |
34 | DCCPAV_ECN_MARKED = 0x40, | 37 | DCCPAV_ECN_MARKED = 0x40, |
@@ -117,6 +120,7 @@ extern int dccp_ackvec_parse(struct sock *sk, const struct sk_buff *skb, | |||
117 | u64 *ackno, const u8 opt, | 120 | u64 *ackno, const u8 opt, |
118 | const u8 *value, const u8 len); | 121 | const u8 *value, const u8 len); |
119 | 122 | ||
123 | extern void dccp_ackvec_input(struct dccp_ackvec *av, struct sk_buff *skb); | ||
120 | extern int dccp_ackvec_update_records(struct dccp_ackvec *av, u64 seq, u8 sum); | 124 | extern int dccp_ackvec_update_records(struct dccp_ackvec *av, u64 seq, u8 sum); |
121 | extern void dccp_ackvec_clear_state(struct dccp_ackvec *av, const u64 ackno); | 125 | extern void dccp_ackvec_clear_state(struct dccp_ackvec *av, const u64 ackno); |
122 | extern u16 dccp_ackvec_buflen(const struct dccp_ackvec *av); | 126 | extern u16 dccp_ackvec_buflen(const struct dccp_ackvec *av); |
@@ -144,6 +148,11 @@ static inline void dccp_ackvec_free(struct dccp_ackvec *av) | |||
144 | { | 148 | { |
145 | } | 149 | } |
146 | 150 | ||
151 | static inline void dccp_ackvec_input(struct dccp_ackvec *av, struct sk_buff *skb) | ||
152 | { | ||
153 | |||
154 | } | ||
155 | |||
147 | static inline int dccp_ackvec_add(struct dccp_ackvec *av, const struct sock *sk, | 156 | static inline int dccp_ackvec_add(struct dccp_ackvec *av, const struct sock *sk, |
148 | const u64 ackno, const u8 state) | 157 | const u64 ackno, const u8 state) |
149 | { | 158 | { |