Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 78202
b: refs/heads/master
c: 63df18a
h: refs/heads/master
v: v3
  • Loading branch information
Gerrit Renker authored and David S. Miller committed Jan 28, 2008
1 parent 575e3b5 commit ce2c9e3
Show file tree
Hide file tree
Showing 3 changed files with 6 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: 7792cd8885954eb7ac38e781a7a9faae5a80a3d8
refs/heads/master: 63df18ad7fb91c65dafc89d3cf94a58a486ad416
8 changes: 3 additions & 5 deletions trunk/net/dccp/ccids/ccid2.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,7 @@ static void ccid2_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
hctx->ccid2hctx_rpdupack++;

/* check if we got enough dupacks */
if (hctx->ccid2hctx_rpdupack >=
hctx->ccid2hctx_numdupack) {
if (hctx->ccid2hctx_rpdupack >= NUMDUPACK) {
hctx->ccid2hctx_rpdupack = -1; /* XXX lame */
hctx->ccid2hctx_rpseq = 0;

Expand Down Expand Up @@ -708,7 +707,7 @@ static void ccid2_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
while (1) {
if (seqp->ccid2s_acked) {
done++;
if (done == hctx->ccid2hctx_numdupack)
if (done == NUMDUPACK)
break;
}
if (seqp == hctx->ccid2hctx_seqt)
Expand All @@ -719,7 +718,7 @@ static void ccid2_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
/* If there are at least 3 acknowledgements, anything unacknowledged
* below the last sequence number is considered lost
*/
if (done == hctx->ccid2hctx_numdupack) {
if (done == NUMDUPACK) {
struct ccid2_seq *last_acked = seqp;

/* check for lost packets */
Expand Down Expand Up @@ -761,7 +760,6 @@ static int ccid2_hc_tx_init(struct ccid *ccid, struct sock *sk)

/* RFC 4341, 5: initialise ssthresh to arbitrarily high (max) value */
hctx->ccid2hctx_ssthresh = ~0;
hctx->ccid2hctx_numdupack = 3;

/*
* RFC 4341, 5: "The cwnd parameter is initialized to at most four
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 @@ -24,6 +24,8 @@
#include <linux/timer.h>
#include <linux/types.h>
#include "../ccid.h"
/* NUMDUPACK parameter from RFC 4341, p. 6 */
#define NUMDUPACK 3

struct sock;

Expand Down Expand Up @@ -52,7 +54,6 @@ struct ccid2_hc_tx_sock {
int ccid2hctx_acks;
unsigned int ccid2hctx_ssthresh;
int ccid2hctx_pipe;
int ccid2hctx_numdupack;
struct ccid2_seq *ccid2hctx_seqbuf[CCID2_SEQBUF_MAX];
int ccid2hctx_seqbufc;
struct ccid2_seq *ccid2hctx_seqh;
Expand Down

0 comments on commit ce2c9e3

Please sign in to comment.