diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-05-28 17:53:08 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-07-11 01:15:23 -0400 |
commit | cc4d6a3a34ce3976d7d01d044f3093cddc2921c2 (patch) | |
tree | ddf0a5d4aaac4661f3bb1fadd60082febc21b9ef /net/dccp/ccids/ccid3.c | |
parent | c70b729e662a1b3ee2ef5370c1e4c9bc3ddc239f (diff) |
loss_interval: Nuke dccp_li_hist
It had just a slab cache, so, for the sake of simplicity just make
dccp_trfc_lib module init routine create the slab cache, no need for users of
the lib to create a private loss_interval object.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'net/dccp/ccids/ccid3.c')
-rw-r--r-- | net/dccp/ccids/ccid3.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c index 9d2e2c193cc6..407f10c742ae 100644 --- a/net/dccp/ccids/ccid3.c +++ b/net/dccp/ccids/ccid3.c | |||
@@ -49,7 +49,6 @@ static int ccid3_debug; | |||
49 | 49 | ||
50 | static struct dccp_tx_hist *ccid3_tx_hist; | 50 | static struct dccp_tx_hist *ccid3_tx_hist; |
51 | static struct dccp_rx_hist *ccid3_rx_hist; | 51 | static struct dccp_rx_hist *ccid3_rx_hist; |
52 | static struct dccp_li_hist *ccid3_li_hist; | ||
53 | 52 | ||
54 | /* | 53 | /* |
55 | * Transmitter Half-Connection Routines | 54 | * Transmitter Half-Connection Routines |
@@ -844,7 +843,7 @@ static int ccid3_hc_rx_detect_loss(struct sock *sk, | |||
844 | while (dccp_delta_seqno(hcrx->ccid3hcrx_seqno_nonloss, seqno) | 843 | while (dccp_delta_seqno(hcrx->ccid3hcrx_seqno_nonloss, seqno) |
845 | > TFRC_RECV_NUM_LATE_LOSS) { | 844 | > TFRC_RECV_NUM_LATE_LOSS) { |
846 | loss = 1; | 845 | loss = 1; |
847 | dccp_li_update_li(sk, ccid3_li_hist, | 846 | dccp_li_update_li(sk, |
848 | &hcrx->ccid3hcrx_li_hist, | 847 | &hcrx->ccid3hcrx_li_hist, |
849 | &hcrx->ccid3hcrx_hist, | 848 | &hcrx->ccid3hcrx_hist, |
850 | &hcrx->ccid3hcrx_tstamp_last_feedback, | 849 | &hcrx->ccid3hcrx_tstamp_last_feedback, |
@@ -1011,7 +1010,7 @@ static void ccid3_hc_rx_exit(struct sock *sk) | |||
1011 | dccp_rx_hist_purge(ccid3_rx_hist, &hcrx->ccid3hcrx_hist); | 1010 | dccp_rx_hist_purge(ccid3_rx_hist, &hcrx->ccid3hcrx_hist); |
1012 | 1011 | ||
1013 | /* Empty loss interval history */ | 1012 | /* Empty loss interval history */ |
1014 | dccp_li_hist_purge(ccid3_li_hist, &hcrx->ccid3hcrx_li_hist); | 1013 | dccp_li_hist_purge(&hcrx->ccid3hcrx_li_hist); |
1015 | } | 1014 | } |
1016 | 1015 | ||
1017 | static void ccid3_hc_rx_get_info(struct sock *sk, struct tcp_info *info) | 1016 | static void ccid3_hc_rx_get_info(struct sock *sk, struct tcp_info *info) |
@@ -1095,19 +1094,12 @@ static __init int ccid3_module_init(void) | |||
1095 | if (ccid3_tx_hist == NULL) | 1094 | if (ccid3_tx_hist == NULL) |
1096 | goto out_free_rx; | 1095 | goto out_free_rx; |
1097 | 1096 | ||
1098 | ccid3_li_hist = dccp_li_hist_new("ccid3"); | ||
1099 | if (ccid3_li_hist == NULL) | ||
1100 | goto out_free_tx; | ||
1101 | |||
1102 | rc = ccid_register(&ccid3); | 1097 | rc = ccid_register(&ccid3); |
1103 | if (rc != 0) | 1098 | if (rc != 0) |
1104 | goto out_free_loss_interval_history; | 1099 | goto out_free_tx; |
1105 | out: | 1100 | out: |
1106 | return rc; | 1101 | return rc; |
1107 | 1102 | ||
1108 | out_free_loss_interval_history: | ||
1109 | dccp_li_hist_delete(ccid3_li_hist); | ||
1110 | ccid3_li_hist = NULL; | ||
1111 | out_free_tx: | 1103 | out_free_tx: |
1112 | dccp_tx_hist_delete(ccid3_tx_hist); | 1104 | dccp_tx_hist_delete(ccid3_tx_hist); |
1113 | ccid3_tx_hist = NULL; | 1105 | ccid3_tx_hist = NULL; |
@@ -1130,10 +1122,6 @@ static __exit void ccid3_module_exit(void) | |||
1130 | dccp_rx_hist_delete(ccid3_rx_hist); | 1122 | dccp_rx_hist_delete(ccid3_rx_hist); |
1131 | ccid3_rx_hist = NULL; | 1123 | ccid3_rx_hist = NULL; |
1132 | } | 1124 | } |
1133 | if (ccid3_li_hist != NULL) { | ||
1134 | dccp_li_hist_delete(ccid3_li_hist); | ||
1135 | ccid3_li_hist = NULL; | ||
1136 | } | ||
1137 | } | 1125 | } |
1138 | module_exit(ccid3_module_exit); | 1126 | module_exit(ccid3_module_exit); |
1139 | 1127 | ||