diff options
-rw-r--r-- | net/dccp/ccids/ccid3.c | 22 | ||||
-rw-r--r-- | net/dccp/packet_history.h | 13 |
2 files changed, 18 insertions, 17 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; |
1010 | out: | 1010 | out: |
@@ -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 | ||
1821 | out_update_li: | 1821 | out_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 | ||
diff --git a/net/dccp/packet_history.h b/net/dccp/packet_history.h index 565dc96506e9..0056525a656c 100644 --- a/net/dccp/packet_history.h +++ b/net/dccp/packet_history.h | |||
@@ -47,15 +47,16 @@ | |||
47 | struct dccp_tx_hist_entry { | 47 | struct dccp_tx_hist_entry { |
48 | struct list_head dccphtx_node; | 48 | struct list_head dccphtx_node; |
49 | u64 dccphtx_seqno:48, | 49 | u64 dccphtx_seqno:48, |
50 | dccphtx_win_count:8, | 50 | dccphtx_ccval:4, |
51 | dccphtx_sent:1; | 51 | dccphtx_sent:1; |
52 | u32 dccphtx_rtt; | ||
52 | struct timeval dccphtx_tstamp; | 53 | struct timeval dccphtx_tstamp; |
53 | }; | 54 | }; |
54 | 55 | ||
55 | struct dccp_rx_hist_entry { | 56 | struct dccp_rx_hist_entry { |
56 | struct list_head dccphrx_node; | 57 | struct list_head dccphrx_node; |
57 | u64 dccphrx_seqno:48, | 58 | u64 dccphrx_seqno:48, |
58 | dccphrx_win_count:4, | 59 | dccphrx_ccval:4, |
59 | dccphrx_type:4; | 60 | dccphrx_type:4; |
60 | u32 dccphrx_ndp; /* In fact it is from 8 to 24 bits */ | 61 | u32 dccphrx_ndp; /* In fact it is from 8 to 24 bits */ |
61 | struct timeval dccphrx_tstamp; | 62 | struct timeval dccphrx_tstamp; |
@@ -136,10 +137,10 @@ static inline struct dccp_rx_hist_entry * | |||
136 | if (entry != NULL) { | 137 | if (entry != NULL) { |
137 | const struct dccp_hdr *dh = dccp_hdr(skb); | 138 | const struct dccp_hdr *dh = dccp_hdr(skb); |
138 | 139 | ||
139 | entry->dccphrx_seqno = DCCP_SKB_CB(skb)->dccpd_seq; | 140 | entry->dccphrx_seqno = DCCP_SKB_CB(skb)->dccpd_seq; |
140 | entry->dccphrx_win_count = dh->dccph_ccval; | 141 | entry->dccphrx_ccval = dh->dccph_ccval; |
141 | entry->dccphrx_type = dh->dccph_type; | 142 | entry->dccphrx_type = dh->dccph_type; |
142 | entry->dccphrx_ndp = ndp; | 143 | entry->dccphrx_ndp = ndp; |
143 | do_gettimeofday(&(entry->dccphrx_tstamp)); | 144 | do_gettimeofday(&(entry->dccphrx_tstamp)); |
144 | } | 145 | } |
145 | 146 | ||