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 /net/dccp/ccids/ccid3.c | |
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>
Diffstat (limited to 'net/dccp/ccids/ccid3.c')
-rw-r--r-- | net/dccp/ccids/ccid3.c | 32 |
1 files changed, 16 insertions, 16 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); |