Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 44279
b: refs/heads/master
c: de553c1
h: refs/heads/master
i:
  44277: 3cc2064
  44275: c4c80c2
  44271: de387d9
v: v3
  • Loading branch information
Gerrit Renker authored and David S. Miller committed Dec 11, 2006
1 parent 3e29a9f commit fea6342
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 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: fe0499ae95f5f636bda1f6e0bdba5b7b023ea827
refs/heads/master: de553c189e3faa0d0c38f366f73379b46587b80e
4 changes: 3 additions & 1 deletion trunk/net/dccp/ccids/ccid3.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,8 +456,9 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
r_sample, t_elapsed);
else
r_sample -= t_elapsed;
CCID3_RTT_SANITY_CHECK(r_sample);

/* Update RTT estimate by
/* Update RTT estimate by
* If (No feedback recv)
* R = R_sample;
* Else
Expand Down Expand Up @@ -1000,6 +1001,7 @@ static void ccid3_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb)
r_sample, t_elapsed);
else
r_sample -= t_elapsed;
CCID3_RTT_SANITY_CHECK(r_sample);

if (hcrx->ccid3hcrx_state == TFRC_RSTATE_NO_DATA)
hcrx->ccid3hcrx_rtt = r_sample;
Expand Down
10 changes: 10 additions & 0 deletions trunk/net/dccp/ccids/ccid3.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@
/* Parameter t_mbi from [RFC 3448, 4.3]: backoff interval in seconds */
#define TFRC_T_MBI 64

/* What we think is a reasonable upper limit on RTT values */
#define CCID3_SANE_RTT_MAX (4 * USEC_PER_SEC)

#define CCID3_RTT_SANITY_CHECK(rtt) do { \
if (rtt > CCID3_SANE_RTT_MAX) { \
DCCP_CRIT("RTT (%ld) too large, substituting %ld", \
rtt, CCID3_SANE_RTT_MAX); \
rtt = CCID3_SANE_RTT_MAX; \
} } while (0)

enum ccid3_options {
TFRC_OPT_LOSS_EVENT_RATE = 192,
TFRC_OPT_LOSS_INTERVALS = 193,
Expand Down

0 comments on commit fea6342

Please sign in to comment.