Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 78200
b: refs/heads/master
c: 900bfed
h: refs/heads/master
v: v3
  • Loading branch information
Gerrit Renker authored and David S. Miller committed Jan 28, 2008
1 parent 450fb8d commit bfd829e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b00d2bbc45a287c9a72374582ce42205f3412419
refs/heads/master: 900bfed4718126e6c32244903b6f43e0990d04ad
23 changes: 21 additions & 2 deletions trunk/net/dccp/ccids/ccid2.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,6 @@ static void ccid2_hc_tx_rto_expire(unsigned long data)
hctx->ccid2hctx_sent = 0;

/* clear ack ratio state. */
hctx->ccid2hctx_arsent = 0;
hctx->ccid2hctx_ackloss = 0;
hctx->ccid2hctx_rpseq = 0;
hctx->ccid2hctx_rpdupack = -1;
ccid2_change_l_ack_ratio(sk, 1);
Expand Down Expand Up @@ -289,6 +287,26 @@ static void ccid2_hc_tx_packet_sent(struct sock *sk, int more, unsigned int len)

hctx->ccid2hctx_sent++;

/*
* FIXME: The code below is broken and the variables have been removed
* from the socket struct. The `ackloss' variable was always set to 0,
* and with arsent there are several problems:
* (i) it doesn't just count the number of Acks, but all sent packets;
* (ii) it is expressed in # of packets, not # of windows, so the
* comparison below uses the wrong formula: Appendix A of RFC 4341
* comes up with the number K = cwnd / (R^2 - R) of consecutive windows
* of data with no lost or marked Ack packets. If arsent were the # of
* consecutive Acks received without loss, then Ack Ratio needs to be
* decreased by 1 when
* arsent >= K * cwnd / R = cwnd^2 / (R^3 - R^2)
* where cwnd / R is the number of Acks received per window of data
* (cf. RFC 4341, App. A). The problems are that
* - arsent counts other packets as well;
* - the comparison uses a formula different from RFC 4341;
* - computing a cubic/quadratic equation each time is too complicated.
* Hence a different algorithm is needed.
*/
#if 0
/* Ack Ratio. Need to maintain a concept of how many windows we sent */
hctx->ccid2hctx_arsent++;
/* We had an ack loss in this window... */
Expand Down Expand Up @@ -316,6 +334,7 @@ static void ccid2_hc_tx_packet_sent(struct sock *sk, int more, unsigned int len)
hctx->ccid2hctx_arsent = 0; /* or maybe set it to cwnd*/
}
}
#endif

/* setup RTO timer */
if (!timer_pending(&hctx->ccid2hctx_rtotimer))
Expand Down
4 changes: 0 additions & 4 deletions trunk/net/dccp/ccids/ccid2.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ struct ccid2_seq {
* @ccid2hctx_acks - ACKS recv in AI phase
* @ccid2hctx_sent - packets sent in this window
* @ccid2hctx_lastrtt -time RTT was last measured
* @ccid2hctx_arsent - packets sent [ack ratio]
* @ccid2hctx_ackloss - ack was lost in this win
* @ccid2hctx_rpseq - last consecutive seqno
* @ccid2hctx_rpdupack - dupacks since rpseq
*/
Expand All @@ -66,8 +64,6 @@ struct ccid2_hc_tx_sock {
int ccid2hctx_sent;
unsigned long ccid2hctx_lastrtt;
struct timer_list ccid2hctx_rtotimer;
unsigned long ccid2hctx_arsent;
int ccid2hctx_ackloss;
u64 ccid2hctx_rpseq;
int ccid2hctx_rpdupack;
int ccid2hctx_sendwait;
Expand Down

0 comments on commit bfd829e

Please sign in to comment.