* [PATCH] IPv4: unresolved multicast route cleanup
@ 2010-05-03 9:47 Andreas Meißner
2010-05-03 22:41 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Andreas Meißner @ 2010-05-03 9:47 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
from: Andreas Meissner <andreas.meissner@sphairon.com>
Fixes the expiration timer for unresolved multicast route entries.
In case new multicast routing requests come in faster than the
expiration timeout occurs (e.g. zap through multicast TV streams), the
timer is prevented from being called at time for already existing entries.
Signed-off by: Andreas Meissner <andreas.meissner@sphairon.com>
---
As the single timer is resetted to default whenever a new entry is made,
the timeout for existing unresolved entires are missed and/or not
updated. As a consequence new requests are denied when the limit of
unresolved entries has been reached because old entries live longer than
they are supposed to.
The solution is to reset the timer only for the first unresolved entry
in the multicast routing cache. All other timers are already set and
updated correctly within the timer function itself by now.
---
ipv4/ipmr.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- net/ipv4/ipmr.c.orig 2010-05-03 10:55:06.000000000 +0200
+++ net/ipv4/ipmr.c 2010-05-03 10:58:30.000000000 +0200
@@ -753,7 +753,8 @@ ipmr_cache_unresolved(struct net *net, v
c->next = mfc_unres_queue;
mfc_unres_queue = c;
- mod_timer(&ipmr_expire_timer, c->mfc_un.unres.expires);
+ if (atomic_read(&net->ipv4.cache_resolve_queue_len) == 1)
+ mod_timer(&ipmr_expire_timer, c->mfc_un.unres.expires);
}
/*
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] IPv4: unresolved multicast route cleanup
2010-05-03 9:47 Andreas Meißner
@ 2010-05-03 22:41 ` David Miller
2010-05-10 8:40 ` Andreas Meissner
0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2010-05-03 22:41 UTC (permalink / raw)
To: andreas.meissner; +Cc: netdev
From: Andreas Meißner <andreas.meissner@indakom.de>
Date: Mon, 03 May 2010 11:47:55 +0200
> --- net/ipv4/ipmr.c.orig 2010-05-03 10:55:06.000000000 +0200
> +++ net/ipv4/ipmr.c 2010-05-03 10:58:30.000000000 +0200
> @@ -753,7 +753,8 @@ ipmr_cache_unresolved(struct net *net, v
> c->next = mfc_unres_queue;
> mfc_unres_queue = c;
>
> - mod_timer(&ipmr_expire_timer, c->mfc_un.unres.expires);
> + if (atomic_read(&net->ipv4.cache_resolve_queue_len) == 1)
> + mod_timer(&ipmr_expire_timer, c->mfc_un.unres.expires);
> }
Your email client has corrupted tabs into space characters, and
the new code in your patch is not indented properly.
Please read Documentation/SubmittingPatches and
Documentation/email-clients.txt for help.
Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] IPv4: unresolved multicast route cleanup
2010-05-03 22:41 ` David Miller
@ 2010-05-10 8:40 ` Andreas Meissner
2010-05-10 9:04 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Andreas Meissner @ 2010-05-10 8:40 UTC (permalink / raw)
To: David Miller; +Cc: netdev
David Miller wrote:
>
> Your email client has corrupted tabs into space characters, and
> the new code in your patch is not indented properly.
>
2nd try. Indentation should be ok now, hopefully.
---
ipmr.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- net/ipv4/ipmr.c.orig 2010-05-10 10:07:38.000000000 +0200
+++ net/ipv4/ipmr.c 2010-05-10 10:08:39.000000000 +0200
@@ -753,7 +753,8 @@
c->next = mfc_unres_queue;
mfc_unres_queue = c;
- mod_timer(&ipmr_expire_timer, c->mfc_un.unres.expires);
+ if (atomic_read(&net->ipv4.cache_resolve_queue_len) == 1)
+ mod_timer(&ipmr_expire_timer, c->mfc_un.unres.expires);
}
/*
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] IPv4: unresolved multicast route cleanup
2010-05-10 8:40 ` Andreas Meissner
@ 2010-05-10 9:04 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2010-05-10 9:04 UTC (permalink / raw)
To: andreas.meissner; +Cc: netdev
From: Andreas Meissner <andreas.meissner@indakom.de>
Date: Mon, 10 May 2010 10:40:47 +0200
> David Miller wrote:
>>
>> Your email client has corrupted tabs into space characters, and
>> the new code in your patch is not indented properly.
>>
>
> 2nd try. Indentation should be ok now, hopefully.
Please don't resubmit patches this way. I have to now scour the
mailing list archives to get your commit message, and you also
haven't specifically signed off on this specific new patch so
I couldn't use it anyways.
Always make full, clean resubmissions of your patch, with the
original subject line and full commit message cleanly included
as in your original posting.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] IPv4: unresolved multicast route cleanup
@ 2010-05-10 9:09 Andreas Meissner
2010-05-10 11:48 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Andreas Meissner @ 2010-05-10 9:09 UTC (permalink / raw)
To: David Miller, netdev
from: Andreas Meissner <andreas.meissner@sphairon.com>
Fixes the expiration timer for unresolved multicast route entries.
In case new multicast routing requests come in faster than the
expiration timeout occurs (e.g. zap through multicast TV streams), the
timer is prevented from being called at time for already existing entries.
Signed-off by: Andreas Meissner <andreas.meissner@sphairon.com>
---
As the single timer is resetted to default whenever a new entry is made,
the timeout for existing unresolved entires are missed and/or not
updated. As a consequence new requests are denied when the limit of
unresolved entries has been reached because old entries live longer than
they are supposed to.
The solution is to reset the timer only for the first unresolved entry
in the multicast routing cache. All other timers are already set and
updated correctly within the timer function itself by now.
---
ipv4/ipmr.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- net/ipv4/ipmr.c.orig 2010-05-10 10:07:38.000000000 +0200
+++ net/ipv4/ipmr.c 2010-05-10 10:08:39.000000000 +0200
@@ -753,7 +753,8 @@
c->next = mfc_unres_queue;
mfc_unres_queue = c;
- mod_timer(&ipmr_expire_timer, c->mfc_un.unres.expires);
+ if (atomic_read(&net->ipv4.cache_resolve_queue_len) == 1)
+ mod_timer(&ipmr_expire_timer, c->mfc_un.unres.expires);
}
/*
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] IPv4: unresolved multicast route cleanup
2010-05-10 9:09 [PATCH] IPv4: unresolved multicast route cleanup Andreas Meissner
@ 2010-05-10 11:48 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2010-05-10 11:48 UTC (permalink / raw)
To: andreas.meissner; +Cc: netdev
From: Andreas Meissner <andreas.meissner@indakom.de>
Date: Mon, 10 May 2010 11:09:33 +0200
> from: Andreas Meissner <andreas.meissner@sphairon.com>
>
> Fixes the expiration timer for unresolved multicast route entries.
> In case new multicast routing requests come in faster than the
> expiration timeout occurs (e.g. zap through multicast TV streams), the
> timer is prevented from being called at time for already existing entries.
>
> Signed-off by: Andreas Meissner <andreas.meissner@sphairon.com>
> ---
> As the single timer is resetted to default whenever a new entry is made,
> the timeout for existing unresolved entires are missed and/or not
> updated. As a consequence new requests are denied when the limit of
> unresolved entries has been reached because old entries live longer than
> they are supposed to.
> The solution is to reset the timer only for the first unresolved entry
> in the multicast routing cache. All other timers are already set and
> updated correctly within the timer function itself by now.
Looks great, applied thanks!
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-05-10 11:47 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-10 9:09 [PATCH] IPv4: unresolved multicast route cleanup Andreas Meissner
2010-05-10 11:48 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2010-05-03 9:47 Andreas Meißner
2010-05-03 22:41 ` David Miller
2010-05-10 8:40 ` Andreas Meissner
2010-05-10 9:04 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).