aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ccids/ccid3.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2005-08-13 19:34:23 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-29 18:59:17 -0400
commitc173437669967301facff151bfeb7bae67354e4c (patch)
tree87f041617855039182e3c1e6bb0d22945f218415 /net/dccp/ccids/ccid3.c
parent34b4a4a624bafe089107966a6c56d2a1aca026d4 (diff)
[PACKET_HISTORY]: Add dccphtx_rtt and rename the win_count fields
As requested by Ian. Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com> Signed-off-by: Ian McDonald <iam4@cs.waikato.ac.nz> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/ccids/ccid3.c')
-rw-r--r--net/dccp/ccids/ccid3.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c
index 80f12c990c00..edf9740d8d82 100644
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -1004,7 +1004,7 @@ static int ccid3_hc_tx_send_packet(struct sock *sk,
1004 1004
1005 /* Can we send? if so add options and add to packet history */ 1005 /* Can we send? if so add options and add to packet history */
1006 if (rc == 0) 1006 if (rc == 0)
1007 new_packet->dccphtx_win_count = 1007 new_packet->dccphtx_ccval =
1008 DCCP_SKB_CB(skb)->dccpd_ccval = 1008 DCCP_SKB_CB(skb)->dccpd_ccval =
1009 hctx->ccid3hctx_last_win_count; 1009 hctx->ccid3hctx_last_win_count;
1010out: 1010out:
@@ -1060,7 +1060,7 @@ static void ccid3_hc_tx_packet_sent(struct sock *sk, int more, int len)
1060 min_t(unsigned long, quarter_rtt, 5)) % 16; 1060 min_t(unsigned long, quarter_rtt, 5)) % 16;
1061 ccid3_pr_debug("%s, sk=%p, window changed from %u to %u!\n", 1061 ccid3_pr_debug("%s, sk=%p, window changed from %u to %u!\n",
1062 dccp_role(sk), sk, 1062 dccp_role(sk), sk,
1063 packet->dccphtx_win_count, 1063 packet->dccphtx_ccval,
1064 hctx->ccid3hctx_last_win_count); 1064 hctx->ccid3hctx_last_win_count);
1065 } 1065 }
1066 /* COMPLIANCE_END */ 1066 /* COMPLIANCE_END */
@@ -1068,9 +1068,10 @@ static void ccid3_hc_tx_packet_sent(struct sock *sk, int more, int len)
1068 ccid3_pr_debug("%s, sk=%p, packet sent (%llu,%u)\n", 1068 ccid3_pr_debug("%s, sk=%p, packet sent (%llu,%u)\n",
1069 dccp_role(sk), sk, 1069 dccp_role(sk), sk,
1070 packet->dccphtx_seqno, 1070 packet->dccphtx_seqno,
1071 packet->dccphtx_win_count); 1071 packet->dccphtx_ccval);
1072#endif 1072#endif
1073 hctx->ccid3hctx_idle = 0; 1073 hctx->ccid3hctx_idle = 0;
1074 packet->dccphtx_rtt = hctx->ccid3hctx_rtt;
1074 packet->dccphtx_sent = 1; 1075 packet->dccphtx_sent = 1;
1075 } else 1076 } else
1076 ccid3_pr_debug("%s, sk=%p, seqno=%llu NOT inserted!\n", 1077 ccid3_pr_debug("%s, sk=%p, seqno=%llu NOT inserted!\n",
@@ -1489,11 +1490,10 @@ trim_history:
1489 step = 2; 1490 step = 2;
1490 /* OK, find next data packet */ 1491 /* OK, find next data packet */
1491 num_later = 1; 1492 num_later = 1;
1492 win_count = entry->dccphrx_win_count; 1493 win_count = entry->dccphrx_ccval;
1493 break; 1494 break;
1494 case 2: 1495 case 2:
1495 tmp = (win_count - 1496 tmp = win_count - entry->dccphrx_ccval;
1496 entry->dccphrx_win_count);
1497 if (tmp < 0) 1497 if (tmp < 0)
1498 tmp += TFRC_WIN_COUNT_LIMIT; 1498 tmp += TFRC_WIN_COUNT_LIMIT;
1499 if (tmp > TFRC_WIN_COUNT_PER_RTT + 1) { 1499 if (tmp > TFRC_WIN_COUNT_PER_RTT + 1) {
@@ -1553,7 +1553,7 @@ static void ccid3_hc_rx_send_feedback(struct sock *sk)
1553 } 1553 }
1554 1554
1555 do_gettimeofday(&(hcrx->ccid3hcrx_tstamp_last_feedback)); 1555 do_gettimeofday(&(hcrx->ccid3hcrx_tstamp_last_feedback));
1556 hcrx->ccid3hcrx_last_counter = packet->dccphrx_win_count; 1556 hcrx->ccid3hcrx_last_counter = packet->dccphrx_ccval;
1557 hcrx->ccid3hcrx_seqno_last_counter = packet->dccphrx_seqno; 1557 hcrx->ccid3hcrx_seqno_last_counter = packet->dccphrx_seqno;
1558 hcrx->ccid3hcrx_bytes_recv = 0; 1558 hcrx->ccid3hcrx_bytes_recv = 0;
1559 1559
@@ -1645,11 +1645,11 @@ static u32 ccid3_hc_rx_calc_first_li(struct sock *sk)
1645 switch (step) { 1645 switch (step) {
1646 case 0: 1646 case 0:
1647 tstamp = entry->dccphrx_tstamp; 1647 tstamp = entry->dccphrx_tstamp;
1648 win_count = entry->dccphrx_win_count; 1648 win_count = entry->dccphrx_ccval;
1649 step = 1; 1649 step = 1;
1650 break; 1650 break;
1651 case 1: 1651 case 1:
1652 interval = win_count - entry->dccphrx_win_count; 1652 interval = win_count - entry->dccphrx_ccval;
1653 if (interval < 0) 1653 if (interval < 0)
1654 interval += TFRC_WIN_COUNT_LIMIT; 1654 interval += TFRC_WIN_COUNT_LIMIT;
1655 if (interval > 4) 1655 if (interval > 4)
@@ -1816,7 +1816,7 @@ static void ccid3_hc_rx_detect_loss(struct sock *sk)
1816 } 1816 }
1817 1817
1818 if (seq_loss != DCCP_MAX_SEQNO + 1) 1818 if (seq_loss != DCCP_MAX_SEQNO + 1)
1819 win_loss = a_loss->dccphrx_win_count; 1819 win_loss = a_loss->dccphrx_ccval;
1820 1820
1821out_update_li: 1821out_update_li:
1822 ccid3_hc_rx_update_li(sk, seq_loss, win_loss); 1822 ccid3_hc_rx_update_li(sk, seq_loss, win_loss);
@@ -1918,7 +1918,7 @@ static void ccid3_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb)
1918 return; 1918 return;
1919 } 1919 }
1920 1920
1921 win_count = packet->dccphrx_win_count; 1921 win_count = packet->dccphrx_ccval;
1922 1922
1923 ins = ccid3_hc_rx_add_hist(sk, packet); 1923 ins = ccid3_hc_rx_add_hist(sk, packet);
1924 1924