* [PATCH 1/1] DCCP: Stop logs being filled
@ 2006-10-24 4:32 Ian McDonald
2006-10-24 9:15 ` Gerrit Renker
0 siblings, 1 reply; 2+ messages in thread
From: Ian McDonald @ 2006-10-24 4:32 UTC (permalink / raw)
To: dccp
This patch fixes data being spewed into the logs continually. As the code
stood if there was a large queue and long delays timeo would go down to
zero and never get reset.
This fixes it by resetting timeo. Put constant into header as well.
In my opinion this should go into 2.6.19 as bug and causes logs to be
filled.
Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
---
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h
index 0a21be4..47e3c2e 100644
--- a/net/dccp/dccp.h
+++ b/net/dccp/dccp.h
@@ -58,6 +58,9 @@ #define DCCP_RESOURCE_PROBE_INTERVAL ((u
#define DCCP_RTO_MAX ((unsigned)(120 * HZ)) /* FIXME: using TCP value */
+#define DCCP_XMIT_TIMEO 30000
+/* Time in msecs for blocking transmit per packet */
+
/* is seq1 < seq2 ? */
static inline int before48(const u64 seq1, const u64 seq2)
{
diff --git a/net/dccp/output.c b/net/dccp/output.c
index 7102e3a..5c16892 100644
--- a/net/dccp/output.c
+++ b/net/dccp/output.c
@@ -251,8 +251,8 @@ void dccp_write_xmit(struct sock *sk, in
{
struct dccp_sock *dp = dccp_sk(sk);
struct sk_buff *skb;
- long timeo = 30000; /* If a packet is taking longer than 2 secs
- we have other issues */
+ long timeo = DCCP_XMIT_TIMEO; /* If a packet is taking longer than
+ this we have other issues */
while ((skb = skb_peek(&sk->sk_write_queue))) {
int err = ccid_hc_tx_send_packet(dp->dccps_hc_tx_ccid, sk, skb,
@@ -263,8 +263,10 @@ void dccp_write_xmit(struct sock *sk, in
sk_reset_timer(sk, &dp->dccps_xmit_timer,
msecs_to_jiffies(err)+jiffies);
break;
- } else
+ } else {
err = dccp_wait_for_ccid(sk, skb, &timeo);
+ timeo = DCCP_XMIT_TIMEO;
+ }
if (err) {
printk(KERN_CRIT "%s:err at dccp_wait_for_ccid"
" %d\n", __FUNCTION__, err);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] DCCP: Stop logs being filled
2006-10-24 4:32 [PATCH 1/1] DCCP: Stop logs being filled Ian McDonald
@ 2006-10-24 9:15 ` Gerrit Renker
0 siblings, 0 replies; 2+ messages in thread
From: Gerrit Renker @ 2006-10-24 9:15 UTC (permalink / raw)
To: dccp
| In my opinion this should go into 2.6.19 as bug and causes logs to be
| filled.
ACK - this is useful and I have found it to apply without problem. Minor quibble below.
| @@ -58,6 +58,9 @@ #define DCCP_RESOURCE_PROBE_INTERVAL ((u
|
| #define DCCP_RTO_MAX ((unsigned)(120 * HZ)) /* FIXME: using TCP value */
|
| +#define DCCP_XMIT_TIMEO 30000
| +/* Time in msecs for blocking transmit per packet */
All the #define comments in dccp.h are on the right, for consistency, maybe better:
#define DCCP_XMIT_TIMEO 30000 /* Time/ msecs for blocking transmit per packet */
(which is below the limit of 80 chars)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-10-24 9:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-24 4:32 [PATCH 1/1] DCCP: Stop logs being filled Ian McDonald
2006-10-24 9:15 ` Gerrit Renker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox