Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 44267
b: refs/heads/master
c: 45393a6
h: refs/heads/master
i:
  44265: 93b69b5
  44263: 29e4662
v: v3
  • Loading branch information
Gerrit Renker authored and David S. Miller committed Dec 11, 2006
1 parent f3978e4 commit fe47220
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 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: 5fce9a2da8a3b4ed088d9c0ac7c938a638044fdb
refs/heads/master: 45393a66a2c30fc8ed86e6c79a63a3cd5231c69f
13 changes: 9 additions & 4 deletions trunk/net/dccp/ccids/ccid3.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,9 +444,9 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)

/* Update loss event rate */
pinv = opt_recv->ccid3or_loss_event_rate;
if (pinv == ~0U || pinv == 0)
if (pinv == ~0U || pinv == 0) /* see RFC 4342, 8.5 */
hctx->ccid3hctx_p = 0;
else
else /* can not exceed 100% */
hctx->ccid3hctx_p = 1000000 / pinv;

dccp_timestamp(sk, &now);
Expand Down Expand Up @@ -733,10 +733,15 @@ static void ccid3_hc_rx_send_feedback(struct sock *sk)
/* Convert to multiples of 10us */
hcrx->ccid3hcrx_elapsed_time =
timeval_delta(&now, &packet->dccphrx_tstamp) / 10;

if (hcrx->ccid3hcrx_p == 0)
hcrx->ccid3hcrx_pinv = ~0;
else
hcrx->ccid3hcrx_pinv = ~0U; /* see RFC 4342, 8.5 */
else if (hcrx->ccid3hcrx_p > 1000000) {
DCCP_WARN("p (%u) > 100%%\n", hcrx->ccid3hcrx_p);
hcrx->ccid3hcrx_pinv = 1; /* use 100% in this case */
} else
hcrx->ccid3hcrx_pinv = 1000000 / hcrx->ccid3hcrx_p;

dp->dccps_hc_rx_insert_options = 1;
dccp_send_ack(sk);
}
Expand Down

0 comments on commit fe47220

Please sign in to comment.