diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-12-06 09:28:39 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:56:42 -0500 |
commit | d58d1af03a6a3ddf296ae3aeb4ff234af4b15958 (patch) | |
tree | 44194b47b1c1b188f300ec1d1f6f0eed6e9a8849 | |
parent | 34a9e7ea91bb4acb45ae5331e7403304029329b2 (diff) |
[TFRC]: Rename dccp_rx_ to tfrc_rx_
This is in preparation for merging the new rx history code written by Gerrit Renker.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/dccp/ccids/ccid3.c | 32 | ||||
-rw-r--r-- | net/dccp/ccids/lib/loss_interval.c | 14 | ||||
-rw-r--r-- | net/dccp/ccids/lib/packet_history.c | 90 | ||||
-rw-r--r-- | net/dccp/ccids/lib/packet_history.h | 48 |
4 files changed, 92 insertions, 92 deletions
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c index 2ba0a7c470d1..e0f87f22719e 100644 --- a/net/dccp/ccids/ccid3.c +++ b/net/dccp/ccids/ccid3.c | |||
@@ -677,7 +677,7 @@ static void ccid3_hc_rx_send_feedback(struct sock *sk) | |||
677 | { | 677 | { |
678 | struct ccid3_hc_rx_sock *hcrx = ccid3_hc_rx_sk(sk); | 678 | struct ccid3_hc_rx_sock *hcrx = ccid3_hc_rx_sk(sk); |
679 | struct dccp_sock *dp = dccp_sk(sk); | 679 | struct dccp_sock *dp = dccp_sk(sk); |
680 | struct dccp_rx_hist_entry *packet; | 680 | struct tfrc_rx_hist_entry *packet; |
681 | ktime_t now; | 681 | ktime_t now; |
682 | suseconds_t delta; | 682 | suseconds_t delta; |
683 | 683 | ||
@@ -701,7 +701,7 @@ static void ccid3_hc_rx_send_feedback(struct sock *sk) | |||
701 | return; | 701 | return; |
702 | } | 702 | } |
703 | 703 | ||
704 | packet = dccp_rx_hist_find_data_packet(&hcrx->ccid3hcrx_hist); | 704 | packet = tfrc_rx_hist_find_data_packet(&hcrx->ccid3hcrx_hist); |
705 | if (unlikely(packet == NULL)) { | 705 | if (unlikely(packet == NULL)) { |
706 | DCCP_WARN("%s(%p), no data packet in history!\n", | 706 | DCCP_WARN("%s(%p), no data packet in history!\n", |
707 | dccp_role(sk), sk); | 707 | dccp_role(sk), sk); |
@@ -709,7 +709,7 @@ static void ccid3_hc_rx_send_feedback(struct sock *sk) | |||
709 | } | 709 | } |
710 | 710 | ||
711 | hcrx->ccid3hcrx_tstamp_last_feedback = now; | 711 | hcrx->ccid3hcrx_tstamp_last_feedback = now; |
712 | hcrx->ccid3hcrx_ccval_last_counter = packet->dccphrx_ccval; | 712 | hcrx->ccid3hcrx_ccval_last_counter = packet->tfrchrx_ccval; |
713 | hcrx->ccid3hcrx_bytes_recv = 0; | 713 | hcrx->ccid3hcrx_bytes_recv = 0; |
714 | 714 | ||
715 | if (hcrx->ccid3hcrx_p == 0) | 715 | if (hcrx->ccid3hcrx_p == 0) |
@@ -752,12 +752,12 @@ static int ccid3_hc_rx_insert_options(struct sock *sk, struct sk_buff *skb) | |||
752 | } | 752 | } |
753 | 753 | ||
754 | static int ccid3_hc_rx_detect_loss(struct sock *sk, | 754 | static int ccid3_hc_rx_detect_loss(struct sock *sk, |
755 | struct dccp_rx_hist_entry *packet) | 755 | struct tfrc_rx_hist_entry *packet) |
756 | { | 756 | { |
757 | struct ccid3_hc_rx_sock *hcrx = ccid3_hc_rx_sk(sk); | 757 | struct ccid3_hc_rx_sock *hcrx = ccid3_hc_rx_sk(sk); |
758 | struct dccp_rx_hist_entry *rx_hist = | 758 | struct tfrc_rx_hist_entry *rx_hist = |
759 | dccp_rx_hist_head(&hcrx->ccid3hcrx_hist); | 759 | tfrc_rx_hist_head(&hcrx->ccid3hcrx_hist); |
760 | u64 seqno = packet->dccphrx_seqno; | 760 | u64 seqno = packet->tfrchrx_seqno; |
761 | u64 tmp_seqno; | 761 | u64 tmp_seqno; |
762 | int loss = 0; | 762 | int loss = 0; |
763 | u8 ccval; | 763 | u8 ccval; |
@@ -766,9 +766,9 @@ static int ccid3_hc_rx_detect_loss(struct sock *sk, | |||
766 | tmp_seqno = hcrx->ccid3hcrx_seqno_nonloss; | 766 | tmp_seqno = hcrx->ccid3hcrx_seqno_nonloss; |
767 | 767 | ||
768 | if (!rx_hist || | 768 | if (!rx_hist || |
769 | follows48(packet->dccphrx_seqno, hcrx->ccid3hcrx_seqno_nonloss)) { | 769 | follows48(packet->tfrchrx_seqno, hcrx->ccid3hcrx_seqno_nonloss)) { |
770 | hcrx->ccid3hcrx_seqno_nonloss = seqno; | 770 | hcrx->ccid3hcrx_seqno_nonloss = seqno; |
771 | hcrx->ccid3hcrx_ccval_nonloss = packet->dccphrx_ccval; | 771 | hcrx->ccid3hcrx_ccval_nonloss = packet->tfrchrx_ccval; |
772 | goto detect_out; | 772 | goto detect_out; |
773 | } | 773 | } |
774 | 774 | ||
@@ -789,7 +789,7 @@ static int ccid3_hc_rx_detect_loss(struct sock *sk, | |||
789 | dccp_inc_seqno(&tmp_seqno); | 789 | dccp_inc_seqno(&tmp_seqno); |
790 | hcrx->ccid3hcrx_seqno_nonloss = tmp_seqno; | 790 | hcrx->ccid3hcrx_seqno_nonloss = tmp_seqno; |
791 | dccp_inc_seqno(&tmp_seqno); | 791 | dccp_inc_seqno(&tmp_seqno); |
792 | while (dccp_rx_hist_find_entry(&hcrx->ccid3hcrx_hist, | 792 | while (tfrc_rx_hist_find_entry(&hcrx->ccid3hcrx_hist, |
793 | tmp_seqno, &ccval)) { | 793 | tmp_seqno, &ccval)) { |
794 | hcrx->ccid3hcrx_seqno_nonloss = tmp_seqno; | 794 | hcrx->ccid3hcrx_seqno_nonloss = tmp_seqno; |
795 | hcrx->ccid3hcrx_ccval_nonloss = ccval; | 795 | hcrx->ccid3hcrx_ccval_nonloss = ccval; |
@@ -799,13 +799,13 @@ static int ccid3_hc_rx_detect_loss(struct sock *sk, | |||
799 | 799 | ||
800 | /* FIXME - this code could be simplified with above while */ | 800 | /* FIXME - this code could be simplified with above while */ |
801 | /* but works at moment */ | 801 | /* but works at moment */ |
802 | if (follows48(packet->dccphrx_seqno, hcrx->ccid3hcrx_seqno_nonloss)) { | 802 | if (follows48(packet->tfrchrx_seqno, hcrx->ccid3hcrx_seqno_nonloss)) { |
803 | hcrx->ccid3hcrx_seqno_nonloss = seqno; | 803 | hcrx->ccid3hcrx_seqno_nonloss = seqno; |
804 | hcrx->ccid3hcrx_ccval_nonloss = packet->dccphrx_ccval; | 804 | hcrx->ccid3hcrx_ccval_nonloss = packet->tfrchrx_ccval; |
805 | } | 805 | } |
806 | 806 | ||
807 | detect_out: | 807 | detect_out: |
808 | dccp_rx_hist_add_packet(&hcrx->ccid3hcrx_hist, | 808 | tfrc_rx_hist_add_packet(&hcrx->ccid3hcrx_hist, |
809 | &hcrx->ccid3hcrx_li_hist, packet, | 809 | &hcrx->ccid3hcrx_li_hist, packet, |
810 | hcrx->ccid3hcrx_seqno_nonloss); | 810 | hcrx->ccid3hcrx_seqno_nonloss); |
811 | return loss; | 811 | return loss; |
@@ -815,7 +815,7 @@ static void ccid3_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb) | |||
815 | { | 815 | { |
816 | struct ccid3_hc_rx_sock *hcrx = ccid3_hc_rx_sk(sk); | 816 | struct ccid3_hc_rx_sock *hcrx = ccid3_hc_rx_sk(sk); |
817 | const struct dccp_options_received *opt_recv; | 817 | const struct dccp_options_received *opt_recv; |
818 | struct dccp_rx_hist_entry *packet; | 818 | struct tfrc_rx_hist_entry *packet; |
819 | u32 p_prev, r_sample, rtt_prev; | 819 | u32 p_prev, r_sample, rtt_prev; |
820 | int loss, payload_size; | 820 | int loss, payload_size; |
821 | ktime_t now; | 821 | ktime_t now; |
@@ -850,7 +850,7 @@ static void ccid3_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb) | |||
850 | return; | 850 | return; |
851 | } | 851 | } |
852 | 852 | ||
853 | packet = dccp_rx_hist_entry_new(opt_recv->dccpor_ndp, skb, GFP_ATOMIC); | 853 | packet = tfrc_rx_hist_entry_new(opt_recv->dccpor_ndp, skb, GFP_ATOMIC); |
854 | if (unlikely(packet == NULL)) { | 854 | if (unlikely(packet == NULL)) { |
855 | DCCP_WARN("%s(%p), Not enough mem to add rx packet " | 855 | DCCP_WARN("%s(%p), Not enough mem to add rx packet " |
856 | "to history, consider it lost!\n", dccp_role(sk), sk); | 856 | "to history, consider it lost!\n", dccp_role(sk), sk); |
@@ -933,7 +933,7 @@ static void ccid3_hc_rx_exit(struct sock *sk) | |||
933 | ccid3_hc_rx_set_state(sk, TFRC_RSTATE_TERM); | 933 | ccid3_hc_rx_set_state(sk, TFRC_RSTATE_TERM); |
934 | 934 | ||
935 | /* Empty packet history */ | 935 | /* Empty packet history */ |
936 | dccp_rx_hist_purge(&hcrx->ccid3hcrx_hist); | 936 | tfrc_rx_hist_purge(&hcrx->ccid3hcrx_hist); |
937 | 937 | ||
938 | /* Empty loss interval history */ | 938 | /* Empty loss interval history */ |
939 | dccp_li_hist_purge(&hcrx->ccid3hcrx_li_hist); | 939 | dccp_li_hist_purge(&hcrx->ccid3hcrx_li_hist); |
diff --git a/net/dccp/ccids/lib/loss_interval.c b/net/dccp/ccids/lib/loss_interval.c index f2ca4eb74ddb..a5f59af8df43 100644 --- a/net/dccp/ccids/lib/loss_interval.c +++ b/net/dccp/ccids/lib/loss_interval.c | |||
@@ -129,7 +129,7 @@ static u32 dccp_li_calc_first_li(struct sock *sk, | |||
129 | u16 s, u32 bytes_recv, | 129 | u16 s, u32 bytes_recv, |
130 | u32 previous_x_recv) | 130 | u32 previous_x_recv) |
131 | { | 131 | { |
132 | struct dccp_rx_hist_entry *entry, *next, *tail = NULL; | 132 | struct tfrc_rx_hist_entry *entry, *next, *tail = NULL; |
133 | u32 x_recv, p; | 133 | u32 x_recv, p; |
134 | suseconds_t rtt, delta; | 134 | suseconds_t rtt, delta; |
135 | ktime_t tstamp = ktime_set(0, 0); | 135 | ktime_t tstamp = ktime_set(0, 0); |
@@ -138,18 +138,18 @@ static u32 dccp_li_calc_first_li(struct sock *sk, | |||
138 | int step = 0; | 138 | int step = 0; |
139 | u64 fval; | 139 | u64 fval; |
140 | 140 | ||
141 | list_for_each_entry_safe(entry, next, hist_list, dccphrx_node) { | 141 | list_for_each_entry_safe(entry, next, hist_list, tfrchrx_node) { |
142 | if (dccp_rx_hist_entry_data_packet(entry)) { | 142 | if (tfrc_rx_hist_entry_data_packet(entry)) { |
143 | tail = entry; | 143 | tail = entry; |
144 | 144 | ||
145 | switch (step) { | 145 | switch (step) { |
146 | case 0: | 146 | case 0: |
147 | tstamp = entry->dccphrx_tstamp; | 147 | tstamp = entry->tfrchrx_tstamp; |
148 | win_count = entry->dccphrx_ccval; | 148 | win_count = entry->tfrchrx_ccval; |
149 | step = 1; | 149 | step = 1; |
150 | break; | 150 | break; |
151 | case 1: | 151 | case 1: |
152 | interval = win_count - entry->dccphrx_ccval; | 152 | interval = win_count - entry->tfrchrx_ccval; |
153 | if (interval < 0) | 153 | if (interval < 0) |
154 | interval += TFRC_WIN_COUNT_LIMIT; | 154 | interval += TFRC_WIN_COUNT_LIMIT; |
155 | if (interval > 4) | 155 | if (interval > 4) |
@@ -176,7 +176,7 @@ found: | |||
176 | return ~0; | 176 | return ~0; |
177 | } | 177 | } |
178 | 178 | ||
179 | delta = ktime_us_delta(tstamp, tail->dccphrx_tstamp); | 179 | delta = ktime_us_delta(tstamp, tail->tfrchrx_tstamp); |
180 | DCCP_BUG_ON(delta < 0); | 180 | DCCP_BUG_ON(delta < 0); |
181 | 181 | ||
182 | rtt = delta * 4 / interval; | 182 | rtt = delta * 4 / interval; |
diff --git a/net/dccp/ccids/lib/packet_history.c b/net/dccp/ccids/lib/packet_history.c index e1ab853c38df..255cca1ca737 100644 --- a/net/dccp/ccids/lib/packet_history.c +++ b/net/dccp/ccids/lib/packet_history.c | |||
@@ -116,58 +116,58 @@ EXPORT_SYMBOL_GPL(tfrc_tx_hist_rtt); | |||
116 | */ | 116 | */ |
117 | static struct kmem_cache *tfrc_rx_hist_slab; | 117 | static struct kmem_cache *tfrc_rx_hist_slab; |
118 | 118 | ||
119 | struct dccp_rx_hist_entry *dccp_rx_hist_entry_new(const u32 ndp, | 119 | struct tfrc_rx_hist_entry *tfrc_rx_hist_entry_new(const u32 ndp, |
120 | const struct sk_buff *skb, | 120 | const struct sk_buff *skb, |
121 | const gfp_t prio) | 121 | const gfp_t prio) |
122 | { | 122 | { |
123 | struct dccp_rx_hist_entry *entry = kmem_cache_alloc(tfrc_rx_hist_slab, | 123 | struct tfrc_rx_hist_entry *entry = kmem_cache_alloc(tfrc_rx_hist_slab, |
124 | prio); | 124 | prio); |
125 | 125 | ||
126 | if (entry != NULL) { | 126 | if (entry != NULL) { |
127 | const struct dccp_hdr *dh = dccp_hdr(skb); | 127 | const struct dccp_hdr *dh = dccp_hdr(skb); |
128 | 128 | ||
129 | entry->dccphrx_seqno = DCCP_SKB_CB(skb)->dccpd_seq; | 129 | entry->tfrchrx_seqno = DCCP_SKB_CB(skb)->dccpd_seq; |
130 | entry->dccphrx_ccval = dh->dccph_ccval; | 130 | entry->tfrchrx_ccval = dh->dccph_ccval; |
131 | entry->dccphrx_type = dh->dccph_type; | 131 | entry->tfrchrx_type = dh->dccph_type; |
132 | entry->dccphrx_ndp = ndp; | 132 | entry->tfrchrx_ndp = ndp; |
133 | entry->dccphrx_tstamp = ktime_get_real(); | 133 | entry->tfrchrx_tstamp = ktime_get_real(); |
134 | } | 134 | } |
135 | 135 | ||
136 | return entry; | 136 | return entry; |
137 | } | 137 | } |
138 | EXPORT_SYMBOL_GPL(dccp_rx_hist_entry_new); | 138 | EXPORT_SYMBOL_GPL(tfrc_rx_hist_entry_new); |
139 | 139 | ||
140 | static inline void dccp_rx_hist_entry_delete(struct dccp_rx_hist_entry *entry) | 140 | static inline void tfrc_rx_hist_entry_delete(struct tfrc_rx_hist_entry *entry) |
141 | { | 141 | { |
142 | kmem_cache_free(tfrc_rx_hist_slab, entry); | 142 | kmem_cache_free(tfrc_rx_hist_slab, entry); |
143 | } | 143 | } |
144 | 144 | ||
145 | int dccp_rx_hist_find_entry(const struct list_head *list, const u64 seq, | 145 | int tfrc_rx_hist_find_entry(const struct list_head *list, const u64 seq, |
146 | u8 *ccval) | 146 | u8 *ccval) |
147 | { | 147 | { |
148 | struct dccp_rx_hist_entry *packet = NULL, *entry; | 148 | struct tfrc_rx_hist_entry *packet = NULL, *entry; |
149 | 149 | ||
150 | list_for_each_entry(entry, list, dccphrx_node) | 150 | list_for_each_entry(entry, list, tfrchrx_node) |
151 | if (entry->dccphrx_seqno == seq) { | 151 | if (entry->tfrchrx_seqno == seq) { |
152 | packet = entry; | 152 | packet = entry; |
153 | break; | 153 | break; |
154 | } | 154 | } |
155 | 155 | ||
156 | if (packet) | 156 | if (packet) |
157 | *ccval = packet->dccphrx_ccval; | 157 | *ccval = packet->tfrchrx_ccval; |
158 | 158 | ||
159 | return packet != NULL; | 159 | return packet != NULL; |
160 | } | 160 | } |
161 | 161 | ||
162 | EXPORT_SYMBOL_GPL(dccp_rx_hist_find_entry); | 162 | EXPORT_SYMBOL_GPL(tfrc_rx_hist_find_entry); |
163 | struct dccp_rx_hist_entry * | 163 | struct tfrc_rx_hist_entry * |
164 | dccp_rx_hist_find_data_packet(const struct list_head *list) | 164 | tfrc_rx_hist_find_data_packet(const struct list_head *list) |
165 | { | 165 | { |
166 | struct dccp_rx_hist_entry *entry, *packet = NULL; | 166 | struct tfrc_rx_hist_entry *entry, *packet = NULL; |
167 | 167 | ||
168 | list_for_each_entry(entry, list, dccphrx_node) | 168 | list_for_each_entry(entry, list, tfrchrx_node) |
169 | if (entry->dccphrx_type == DCCP_PKT_DATA || | 169 | if (entry->tfrchrx_type == DCCP_PKT_DATA || |
170 | entry->dccphrx_type == DCCP_PKT_DATAACK) { | 170 | entry->tfrchrx_type == DCCP_PKT_DATAACK) { |
171 | packet = entry; | 171 | packet = entry; |
172 | break; | 172 | break; |
173 | } | 173 | } |
@@ -175,29 +175,29 @@ struct dccp_rx_hist_entry * | |||
175 | return packet; | 175 | return packet; |
176 | } | 176 | } |
177 | 177 | ||
178 | EXPORT_SYMBOL_GPL(dccp_rx_hist_find_data_packet); | 178 | EXPORT_SYMBOL_GPL(tfrc_rx_hist_find_data_packet); |
179 | 179 | ||
180 | void dccp_rx_hist_add_packet(struct list_head *rx_list, | 180 | void tfrc_rx_hist_add_packet(struct list_head *rx_list, |
181 | struct list_head *li_list, | 181 | struct list_head *li_list, |
182 | struct dccp_rx_hist_entry *packet, | 182 | struct tfrc_rx_hist_entry *packet, |
183 | u64 nonloss_seqno) | 183 | u64 nonloss_seqno) |
184 | { | 184 | { |
185 | struct dccp_rx_hist_entry *entry, *next; | 185 | struct tfrc_rx_hist_entry *entry, *next; |
186 | u8 num_later = 0; | 186 | u8 num_later = 0; |
187 | 187 | ||
188 | list_add(&packet->dccphrx_node, rx_list); | 188 | list_add(&packet->tfrchrx_node, rx_list); |
189 | 189 | ||
190 | num_later = TFRC_RECV_NUM_LATE_LOSS + 1; | 190 | num_later = TFRC_RECV_NUM_LATE_LOSS + 1; |
191 | 191 | ||
192 | if (!list_empty(li_list)) { | 192 | if (!list_empty(li_list)) { |
193 | list_for_each_entry_safe(entry, next, rx_list, dccphrx_node) { | 193 | list_for_each_entry_safe(entry, next, rx_list, tfrchrx_node) { |
194 | if (num_later == 0) { | 194 | if (num_later == 0) { |
195 | if (after48(nonloss_seqno, | 195 | if (after48(nonloss_seqno, |
196 | entry->dccphrx_seqno)) { | 196 | entry->tfrchrx_seqno)) { |
197 | list_del_init(&entry->dccphrx_node); | 197 | list_del_init(&entry->tfrchrx_node); |
198 | dccp_rx_hist_entry_delete(entry); | 198 | tfrc_rx_hist_entry_delete(entry); |
199 | } | 199 | } |
200 | } else if (dccp_rx_hist_entry_data_packet(entry)) | 200 | } else if (tfrc_rx_hist_entry_data_packet(entry)) |
201 | --num_later; | 201 | --num_later; |
202 | } | 202 | } |
203 | } else { | 203 | } else { |
@@ -208,7 +208,7 @@ void dccp_rx_hist_add_packet(struct list_head *rx_list, | |||
208 | * We have no loss interval history so we need at least one | 208 | * We have no loss interval history so we need at least one |
209 | * rtt:s of data packets to approximate rtt. | 209 | * rtt:s of data packets to approximate rtt. |
210 | */ | 210 | */ |
211 | list_for_each_entry_safe(entry, next, rx_list, dccphrx_node) { | 211 | list_for_each_entry_safe(entry, next, rx_list, tfrchrx_node) { |
212 | if (num_later == 0) { | 212 | if (num_later == 0) { |
213 | switch (step) { | 213 | switch (step) { |
214 | case 0: | 214 | case 0: |
@@ -220,10 +220,10 @@ void dccp_rx_hist_add_packet(struct list_head *rx_list, | |||
220 | step = 2; | 220 | step = 2; |
221 | /* OK, find next data packet */ | 221 | /* OK, find next data packet */ |
222 | num_later = 1; | 222 | num_later = 1; |
223 | win_count = entry->dccphrx_ccval; | 223 | win_count = entry->tfrchrx_ccval; |
224 | break; | 224 | break; |
225 | case 2: | 225 | case 2: |
226 | tmp = win_count - entry->dccphrx_ccval; | 226 | tmp = win_count - entry->tfrchrx_ccval; |
227 | if (tmp < 0) | 227 | if (tmp < 0) |
228 | tmp += TFRC_WIN_COUNT_LIMIT; | 228 | tmp += TFRC_WIN_COUNT_LIMIT; |
229 | if (tmp > TFRC_WIN_COUNT_PER_RTT + 1) { | 229 | if (tmp > TFRC_WIN_COUNT_PER_RTT + 1) { |
@@ -236,29 +236,29 @@ void dccp_rx_hist_add_packet(struct list_head *rx_list, | |||
236 | num_later = 1; | 236 | num_later = 1; |
237 | break; | 237 | break; |
238 | case 3: | 238 | case 3: |
239 | list_del_init(&entry->dccphrx_node); | 239 | list_del_init(&entry->tfrchrx_node); |
240 | dccp_rx_hist_entry_delete(entry); | 240 | tfrc_rx_hist_entry_delete(entry); |
241 | break; | 241 | break; |
242 | } | 242 | } |
243 | } else if (dccp_rx_hist_entry_data_packet(entry)) | 243 | } else if (tfrc_rx_hist_entry_data_packet(entry)) |
244 | --num_later; | 244 | --num_later; |
245 | } | 245 | } |
246 | } | 246 | } |
247 | } | 247 | } |
248 | 248 | ||
249 | EXPORT_SYMBOL_GPL(dccp_rx_hist_add_packet); | 249 | EXPORT_SYMBOL_GPL(tfrc_rx_hist_add_packet); |
250 | 250 | ||
251 | void dccp_rx_hist_purge(struct list_head *list) | 251 | void tfrc_rx_hist_purge(struct list_head *list) |
252 | { | 252 | { |
253 | struct dccp_rx_hist_entry *entry, *next; | 253 | struct tfrc_rx_hist_entry *entry, *next; |
254 | 254 | ||
255 | list_for_each_entry_safe(entry, next, list, dccphrx_node) { | 255 | list_for_each_entry_safe(entry, next, list, tfrchrx_node) { |
256 | list_del_init(&entry->dccphrx_node); | 256 | list_del_init(&entry->tfrchrx_node); |
257 | dccp_rx_hist_entry_delete(entry); | 257 | tfrc_rx_hist_entry_delete(entry); |
258 | } | 258 | } |
259 | } | 259 | } |
260 | 260 | ||
261 | EXPORT_SYMBOL_GPL(dccp_rx_hist_purge); | 261 | EXPORT_SYMBOL_GPL(tfrc_rx_hist_purge); |
262 | 262 | ||
263 | __init int packet_history_init(void) | 263 | __init int packet_history_init(void) |
264 | { | 264 | { |
@@ -269,7 +269,7 @@ __init int packet_history_init(void) | |||
269 | goto out_err; | 269 | goto out_err; |
270 | 270 | ||
271 | tfrc_rx_hist_slab = kmem_cache_create("tfrc_rx_hist", | 271 | tfrc_rx_hist_slab = kmem_cache_create("tfrc_rx_hist", |
272 | sizeof(struct dccp_rx_hist_entry), 0, | 272 | sizeof(struct tfrc_rx_hist_entry), 0, |
273 | SLAB_HWCACHE_ALIGN, NULL); | 273 | SLAB_HWCACHE_ALIGN, NULL); |
274 | if (tfrc_rx_hist_slab == NULL) | 274 | if (tfrc_rx_hist_slab == NULL) |
275 | goto out_free_tx; | 275 | goto out_free_tx; |
diff --git a/net/dccp/ccids/lib/packet_history.h b/net/dccp/ccids/lib/packet_history.h index 34b180b0edaa..5b0b9834340d 100644 --- a/net/dccp/ccids/lib/packet_history.h +++ b/net/dccp/ccids/lib/packet_history.h | |||
@@ -57,51 +57,51 @@ extern u32 tfrc_tx_hist_rtt(struct tfrc_tx_hist_entry *head, | |||
57 | /* | 57 | /* |
58 | * Receiver History data structures and declarations | 58 | * Receiver History data structures and declarations |
59 | */ | 59 | */ |
60 | struct dccp_rx_hist_entry { | 60 | struct tfrc_rx_hist_entry { |
61 | struct list_head dccphrx_node; | 61 | struct list_head tfrchrx_node; |
62 | u64 dccphrx_seqno:48, | 62 | u64 tfrchrx_seqno:48, |
63 | dccphrx_ccval:4, | 63 | tfrchrx_ccval:4, |
64 | dccphrx_type:4; | 64 | tfrchrx_type:4; |
65 | u32 dccphrx_ndp; /* In fact it is from 8 to 24 bits */ | 65 | u32 tfrchrx_ndp; /* In fact it is from 8 to 24 bits */ |
66 | ktime_t dccphrx_tstamp; | 66 | ktime_t tfrchrx_tstamp; |
67 | }; | 67 | }; |
68 | 68 | ||
69 | extern struct dccp_rx_hist_entry * | 69 | extern struct tfrc_rx_hist_entry * |
70 | dccp_rx_hist_entry_new(const u32 ndp, | 70 | tfrc_rx_hist_entry_new(const u32 ndp, |
71 | const struct sk_buff *skb, | 71 | const struct sk_buff *skb, |
72 | const gfp_t prio); | 72 | const gfp_t prio); |
73 | 73 | ||
74 | static inline struct dccp_rx_hist_entry * | 74 | static inline struct tfrc_rx_hist_entry * |
75 | dccp_rx_hist_head(struct list_head *list) | 75 | tfrc_rx_hist_head(struct list_head *list) |
76 | { | 76 | { |
77 | struct dccp_rx_hist_entry *head = NULL; | 77 | struct tfrc_rx_hist_entry *head = NULL; |
78 | 78 | ||
79 | if (!list_empty(list)) | 79 | if (!list_empty(list)) |
80 | head = list_entry(list->next, struct dccp_rx_hist_entry, | 80 | head = list_entry(list->next, struct tfrc_rx_hist_entry, |
81 | dccphrx_node); | 81 | tfrchrx_node); |
82 | return head; | 82 | return head; |
83 | } | 83 | } |
84 | 84 | ||
85 | extern int dccp_rx_hist_find_entry(const struct list_head *list, const u64 seq, | 85 | extern int tfrc_rx_hist_find_entry(const struct list_head *list, const u64 seq, |
86 | u8 *ccval); | 86 | u8 *ccval); |
87 | extern struct dccp_rx_hist_entry * | 87 | extern struct tfrc_rx_hist_entry * |
88 | dccp_rx_hist_find_data_packet(const struct list_head *list); | 88 | tfrc_rx_hist_find_data_packet(const struct list_head *list); |
89 | 89 | ||
90 | extern void dccp_rx_hist_add_packet(struct list_head *rx_list, | 90 | extern void tfrc_rx_hist_add_packet(struct list_head *rx_list, |
91 | struct list_head *li_list, | 91 | struct list_head *li_list, |
92 | struct dccp_rx_hist_entry *packet, | 92 | struct tfrc_rx_hist_entry *packet, |
93 | u64 nonloss_seqno); | 93 | u64 nonloss_seqno); |
94 | 94 | ||
95 | extern void dccp_rx_hist_purge(struct list_head *list); | 95 | extern void tfrc_rx_hist_purge(struct list_head *list); |
96 | 96 | ||
97 | static inline int | 97 | static inline int |
98 | dccp_rx_hist_entry_data_packet(const struct dccp_rx_hist_entry *entry) | 98 | tfrc_rx_hist_entry_data_packet(const struct tfrc_rx_hist_entry *entry) |
99 | { | 99 | { |
100 | return entry->dccphrx_type == DCCP_PKT_DATA || | 100 | return entry->tfrchrx_type == DCCP_PKT_DATA || |
101 | entry->dccphrx_type == DCCP_PKT_DATAACK; | 101 | entry->tfrchrx_type == DCCP_PKT_DATAACK; |
102 | } | 102 | } |
103 | 103 | ||
104 | extern u64 dccp_rx_hist_detect_loss(struct list_head *rx_list, | 104 | extern u64 tfrc_rx_hist_detect_loss(struct list_head *rx_list, |
105 | struct list_head *li_list, u8 *win_loss); | 105 | struct list_head *li_list, u8 *win_loss); |
106 | 106 | ||
107 | #endif /* _DCCP_PKT_HIST_ */ | 107 | #endif /* _DCCP_PKT_HIST_ */ |