aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ccids/ccid2.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp/ccids/ccid2.c')
-rw-r--r--net/dccp/ccids/ccid2.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/net/dccp/ccids/ccid2.c b/net/dccp/ccids/ccid2.c
index 92d016e87816..385f153fe031 100644
--- a/net/dccp/ccids/ccid2.c
+++ b/net/dccp/ccids/ccid2.c
@@ -126,6 +126,16 @@ static void ccid2_change_l_seq_window(struct sock *sk, u64 val)
126 DCCPF_SEQ_WMAX)); 126 DCCPF_SEQ_WMAX));
127} 127}
128 128
129static void dccp_tasklet_schedule(struct sock *sk)
130{
131 struct tasklet_struct *t = &dccp_sk(sk)->dccps_xmitlet;
132
133 if (!test_and_set_bit(TASKLET_STATE_SCHED, &t->state)) {
134 sock_hold(sk);
135 __tasklet_schedule(t);
136 }
137}
138
129static void ccid2_hc_tx_rto_expire(struct timer_list *t) 139static void ccid2_hc_tx_rto_expire(struct timer_list *t)
130{ 140{
131 struct ccid2_hc_tx_sock *hc = from_timer(hc, t, tx_rtotimer); 141 struct ccid2_hc_tx_sock *hc = from_timer(hc, t, tx_rtotimer);
@@ -166,7 +176,7 @@ static void ccid2_hc_tx_rto_expire(struct timer_list *t)
166 176
167 /* if we were blocked before, we may now send cwnd=1 packet */ 177 /* if we were blocked before, we may now send cwnd=1 packet */
168 if (sender_was_blocked) 178 if (sender_was_blocked)
169 tasklet_schedule(&dccp_sk(sk)->dccps_xmitlet); 179 dccp_tasklet_schedule(sk);
170 /* restart backed-off timer */ 180 /* restart backed-off timer */
171 sk_reset_timer(sk, &hc->tx_rtotimer, jiffies + hc->tx_rto); 181 sk_reset_timer(sk, &hc->tx_rtotimer, jiffies + hc->tx_rto);
172out: 182out:
@@ -706,7 +716,7 @@ static void ccid2_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
706done: 716done:
707 /* check if incoming Acks allow pending packets to be sent */ 717 /* check if incoming Acks allow pending packets to be sent */
708 if (sender_was_blocked && !ccid2_cwnd_network_limited(hc)) 718 if (sender_was_blocked && !ccid2_cwnd_network_limited(hc))
709 tasklet_schedule(&dccp_sk(sk)->dccps_xmitlet); 719 dccp_tasklet_schedule(sk);
710 dccp_ackvec_parsed_cleanup(&hc->tx_av_chunks); 720 dccp_ackvec_parsed_cleanup(&hc->tx_av_chunks);
711} 721}
712 722