aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ccids/lib/packet_history.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp/ccids/lib/packet_history.c')
-rw-r--r--net/dccp/ccids/lib/packet_history.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/dccp/ccids/lib/packet_history.c b/net/dccp/ccids/lib/packet_history.c
index 8ea96903033..ee34b456424 100644
--- a/net/dccp/ccids/lib/packet_history.c
+++ b/net/dccp/ccids/lib/packet_history.c
@@ -352,6 +352,16 @@ int tfrc_rx_handle_loss(struct tfrc_rx_hist *h,
352 __three_after_loss(h); 352 __three_after_loss(h);
353 } 353 }
354 354
355 /*
356 * Update moving-average of `s' and the sum of received payload bytes.
357 */
358 if (dccp_data_packet(skb)) {
359 const u32 payload = skb->len - dccp_hdr(skb)->dccph_doff * 4;
360
361 h->packet_size = tfrc_ewma(h->packet_size, payload, 9);
362 h->bytes_recvd += payload;
363 }
364
355 /* RFC 3448, 6.1: update I_0, whose growth implies p <= p_prev */ 365 /* RFC 3448, 6.1: update I_0, whose growth implies p <= p_prev */
356 if (!is_new_loss) 366 if (!is_new_loss)
357 tfrc_lh_update_i_mean(lh, skb); 367 tfrc_lh_update_i_mean(lh, skb);