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>
This commit is contained in:
committed by
David S. Miller
parent
c70b729e66
commit
cc4d6a3a34
@ -49,7 +49,6 @@ static int ccid3_debug;
|
||||
|
||||
static struct dccp_tx_hist *ccid3_tx_hist;
|
||||
static struct dccp_rx_hist *ccid3_rx_hist;
|
||||
static struct dccp_li_hist *ccid3_li_hist;
|
||||
|
||||
/*
|
||||
* Transmitter Half-Connection Routines
|
||||
@ -844,7 +843,7 @@ static int ccid3_hc_rx_detect_loss(struct sock *sk,
|
||||
while (dccp_delta_seqno(hcrx->ccid3hcrx_seqno_nonloss, seqno)
|
||||
> TFRC_RECV_NUM_LATE_LOSS) {
|
||||
loss = 1;
|
||||
dccp_li_update_li(sk, ccid3_li_hist,
|
||||
dccp_li_update_li(sk,
|
||||
&hcrx->ccid3hcrx_li_hist,
|
||||
&hcrx->ccid3hcrx_hist,
|
||||
&hcrx->ccid3hcrx_tstamp_last_feedback,
|
||||
@ -1011,7 +1010,7 @@ static void ccid3_hc_rx_exit(struct sock *sk)
|
||||
dccp_rx_hist_purge(ccid3_rx_hist, &hcrx->ccid3hcrx_hist);
|
||||
|
||||
/* Empty loss interval history */
|
||||
dccp_li_hist_purge(ccid3_li_hist, &hcrx->ccid3hcrx_li_hist);
|
||||
dccp_li_hist_purge(&hcrx->ccid3hcrx_li_hist);
|
||||
}
|
||||
|
||||
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)
|
||||
if (ccid3_tx_hist == NULL)
|
||||
goto out_free_rx;
|
||||
|
||||
ccid3_li_hist = dccp_li_hist_new("ccid3");
|
||||
if (ccid3_li_hist == NULL)
|
||||
goto out_free_tx;
|
||||
|
||||
rc = ccid_register(&ccid3);
|
||||
if (rc != 0)
|
||||
goto out_free_loss_interval_history;
|
||||
goto out_free_tx;
|
||||
out:
|
||||
return rc;
|
||||
|
||||
out_free_loss_interval_history:
|
||||
dccp_li_hist_delete(ccid3_li_hist);
|
||||
ccid3_li_hist = NULL;
|
||||
out_free_tx:
|
||||
dccp_tx_hist_delete(ccid3_tx_hist);
|
||||
ccid3_tx_hist = NULL;
|
||||
@ -1130,10 +1122,6 @@ static __exit void ccid3_module_exit(void)
|
||||
dccp_rx_hist_delete(ccid3_rx_hist);
|
||||
ccid3_rx_hist = NULL;
|
||||
}
|
||||
if (ccid3_li_hist != NULL) {
|
||||
dccp_li_hist_delete(ccid3_li_hist);
|
||||
ccid3_li_hist = NULL;
|
||||
}
|
||||
}
|
||||
module_exit(ccid3_module_exit);
|
||||
|
||||
|
Reference in New Issue
Block a user