diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/dccp/dccp.h | 2 | ||||
-rw-r--r-- | net/dccp/output.c | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h index 3d4b4a908d11..7b859a723826 100644 --- a/net/dccp/dccp.h +++ b/net/dccp/dccp.h | |||
@@ -62,6 +62,8 @@ extern void dccp_time_wait(struct sock *sk, int state, int timeo); | |||
62 | 62 | ||
63 | #define DCCP_RTO_MAX ((unsigned)(120 * HZ)) /* FIXME: using TCP value */ | 63 | #define DCCP_RTO_MAX ((unsigned)(120 * HZ)) /* FIXME: using TCP value */ |
64 | 64 | ||
65 | #define DCCP_XMIT_TIMEO 30000 /* Time/msecs for blocking transmit per packet */ | ||
66 | |||
65 | /* is seq1 < seq2 ? */ | 67 | /* is seq1 < seq2 ? */ |
66 | static inline int before48(const u64 seq1, const u64 seq2) | 68 | static inline int before48(const u64 seq1, const u64 seq2) |
67 | { | 69 | { |
diff --git a/net/dccp/output.c b/net/dccp/output.c index 1ae2248557c6..51654975e8ea 100644 --- a/net/dccp/output.c +++ b/net/dccp/output.c | |||
@@ -249,8 +249,8 @@ void dccp_write_xmit(struct sock *sk, int block) | |||
249 | { | 249 | { |
250 | struct dccp_sock *dp = dccp_sk(sk); | 250 | struct dccp_sock *dp = dccp_sk(sk); |
251 | struct sk_buff *skb; | 251 | struct sk_buff *skb; |
252 | long timeo = 30000; /* If a packet is taking longer than 2 secs | 252 | long timeo = DCCP_XMIT_TIMEO; /* If a packet is taking longer than |
253 | we have other issues */ | 253 | this we have other issues */ |
254 | 254 | ||
255 | while ((skb = skb_peek(&sk->sk_write_queue))) { | 255 | while ((skb = skb_peek(&sk->sk_write_queue))) { |
256 | int err = ccid_hc_tx_send_packet(dp->dccps_hc_tx_ccid, sk, skb, | 256 | int err = ccid_hc_tx_send_packet(dp->dccps_hc_tx_ccid, sk, skb, |
@@ -261,8 +261,10 @@ void dccp_write_xmit(struct sock *sk, int block) | |||
261 | sk_reset_timer(sk, &dp->dccps_xmit_timer, | 261 | sk_reset_timer(sk, &dp->dccps_xmit_timer, |
262 | msecs_to_jiffies(err)+jiffies); | 262 | msecs_to_jiffies(err)+jiffies); |
263 | break; | 263 | break; |
264 | } else | 264 | } else { |
265 | err = dccp_wait_for_ccid(sk, skb, &timeo); | 265 | err = dccp_wait_for_ccid(sk, skb, &timeo); |
266 | timeo = DCCP_XMIT_TIMEO; | ||
267 | } | ||
266 | if (err) { | 268 | if (err) { |
267 | printk(KERN_CRIT "%s:err at dccp_wait_for_ccid" | 269 | printk(KERN_CRIT "%s:err at dccp_wait_for_ccid" |
268 | " %d\n", __FUNCTION__, err); | 270 | " %d\n", __FUNCTION__, err); |