Now ccid3_hc_rx_update_li is ready to be moved to
net/dccp/ccids/lib/loss_interval, it uses the same interface as the other
functions there.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
}
static void ccid3_hc_rx_update_li(struct sock *sk,
}
static void ccid3_hc_rx_update_li(struct sock *sk,
+ struct dccp_li_hist *li_hist,
struct list_head *li_hist_list,
struct list_head *hist_list,
struct timeval *last_feedback,
struct list_head *li_hist_list,
struct list_head *hist_list,
struct timeval *last_feedback,
u64 seq_temp;
if (list_empty(li_hist_list)) {
u64 seq_temp;
if (list_empty(li_hist_list)) {
- if (!dccp_li_hist_interval_new(ccid3_li_hist,
- li_hist_list, seq_loss,
- win_loss))
+ if (!dccp_li_hist_interval_new(li_hist, li_hist_list,
+ seq_loss, win_loss))
return;
head = list_entry(li_hist_list->next, struct dccp_li_hist_entry,
return;
head = list_entry(li_hist_list->next, struct dccp_li_hist_entry,
/* new loss event detected */
/* calculate last interval length */
seq_temp = dccp_delta_seqno(head->dccplih_seqno, seq_loss);
/* new loss event detected */
/* calculate last interval length */
seq_temp = dccp_delta_seqno(head->dccplih_seqno, seq_loss);
- entry = dccp_li_hist_entry_new(ccid3_li_hist, GFP_ATOMIC);
+ entry = dccp_li_hist_entry_new(li_hist, GFP_ATOMIC);
if (entry == NULL) {
DCCP_BUG("out of memory - can not allocate entry");
if (entry == NULL) {
DCCP_BUG("out of memory - can not allocate entry");
tail = li_hist_list->prev;
list_del(tail);
tail = li_hist_list->prev;
list_del(tail);
- kmem_cache_free(ccid3_li_hist->dccplih_slab, tail);
+ kmem_cache_free(li_hist->dccplih_slab, tail);
/* Create the newest interval */
entry->dccplih_seqno = seq_loss;
/* Create the newest interval */
entry->dccplih_seqno = seq_loss;
while (dccp_delta_seqno(hcrx->ccid3hcrx_seqno_nonloss, seqno)
> TFRC_RECV_NUM_LATE_LOSS) {
loss = 1;
while (dccp_delta_seqno(hcrx->ccid3hcrx_seqno_nonloss, seqno)
> TFRC_RECV_NUM_LATE_LOSS) {
loss = 1;
- ccid3_hc_rx_update_li(sk,
+ ccid3_hc_rx_update_li(sk, ccid3_li_hist,
&hcrx->ccid3hcrx_li_hist,
&hcrx->ccid3hcrx_hist,
&hcrx->ccid3hcrx_tstamp_last_feedback,
&hcrx->ccid3hcrx_li_hist,
&hcrx->ccid3hcrx_hist,
&hcrx->ccid3hcrx_tstamp_last_feedback,