Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 78204
b: refs/heads/master
c: 95b21d7
h: refs/heads/master
v: v3
  • Loading branch information
Gerrit Renker authored and David S. Miller committed Jan 28, 2008
1 parent 724c8ea commit af8e709
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 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: 3deeadd74bbf916b502d307222833ffcf68db557
refs/heads/master: 95b21d7e9d099f1cffca08e40f292d6658a88b3c
16 changes: 6 additions & 10 deletions trunk/net/dccp/ccids/ccid2.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,6 @@ static void ccid2_change_srtt(struct ccid2_hc_tx_sock *hctx, long val)
hctx->ccid2hctx_srtt = val;
}

static void ccid2_change_pipe(struct ccid2_hc_tx_sock *hctx, long val)
{
hctx->ccid2hctx_pipe = val;
}

static void ccid2_start_rto_timer(struct sock *sk);

static void ccid2_hc_tx_rto_expire(unsigned long data)
Expand Down Expand Up @@ -205,11 +200,11 @@ static void ccid2_hc_tx_rto_expire(unsigned long data)
ccid2_start_rto_timer(sk);

/* adjust pipe, cwnd etc */
ccid2_change_pipe(hctx, 0);
hctx->ccid2hctx_ssthresh = hctx->ccid2hctx_cwnd / 2;
if (hctx->ccid2hctx_ssthresh < 2)
hctx->ccid2hctx_ssthresh = 2;
hctx->ccid2hctx_cwnd = 1;
hctx->ccid2hctx_pipe = 0;

/* clear state about stuff we sent */
hctx->ccid2hctx_seqt = hctx->ccid2hctx_seqh;
Expand Down Expand Up @@ -248,8 +243,7 @@ static void ccid2_hc_tx_packet_sent(struct sock *sk, int more, unsigned int len)

BUG_ON(!hctx->ccid2hctx_sendwait);
hctx->ccid2hctx_sendwait = 0;
ccid2_change_pipe(hctx, hctx->ccid2hctx_pipe + 1);
BUG_ON(hctx->ccid2hctx_pipe < 0);
hctx->ccid2hctx_pipe++;

/* There is an issue. What if another packet is sent between
* packet_send() and packet_sent(). Then the sequence number would be
Expand Down Expand Up @@ -519,8 +513,10 @@ static void ccid2_hc_tx_dec_pipe(struct sock *sk)
{
struct ccid2_hc_tx_sock *hctx = ccid2_hc_tx_sk(sk);

ccid2_change_pipe(hctx, hctx->ccid2hctx_pipe-1);
BUG_ON(hctx->ccid2hctx_pipe < 0);
if (hctx->ccid2hctx_pipe == 0)
DCCP_BUG("pipe == 0");
else
hctx->ccid2hctx_pipe--;

if (hctx->ccid2hctx_pipe == 0)
ccid2_hc_tx_kill_rto_timer(sk);
Expand Down
3 changes: 2 additions & 1 deletion trunk/net/dccp/ccids/ccid2.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ struct ccid2_seq {

/** struct ccid2_hc_tx_sock - CCID2 TX half connection
*
* @ccid2hctx_{cwnd,ssthresh,pipe}: as per RFC 4341, section 5
* @ccid2hctx_ssacks - ACKs recv in slow start
* @ccid2hctx_acks - ACKS recv in AI phase
* @ccid2hctx_lastrtt -time RTT was last measured
Expand All @@ -51,9 +52,9 @@ struct ccid2_seq {
struct ccid2_hc_tx_sock {
u32 ccid2hctx_cwnd;
u32 ccid2hctx_ssthresh;
u32 ccid2hctx_pipe;
int ccid2hctx_ssacks;
int ccid2hctx_acks;
int ccid2hctx_pipe;
struct ccid2_seq *ccid2hctx_seqbuf[CCID2_SEQBUF_MAX];
int ccid2hctx_seqbufc;
struct ccid2_seq *ccid2hctx_seqh;
Expand Down

0 comments on commit af8e709

Please sign in to comment.