From: Joe Eykholt <jre@nuovasystems.com>
To: Nicolas 2P <nicolas.2p.debian@free.fr>
Cc: Jay Vosburgh <fubar@us.ibm.com>,
David Miller <davem@davemloft.net>,
bonding-devel@lists.sourceforge.net, linux-net@vger.kernel.org,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [patch] bondig - arp_interval with low value => Oops.
Date: Sat, 17 May 2008 13:20:06 -0700 [thread overview]
Message-ID: <482F3DF6.7080403@nuovasystems.com> (raw)
In-Reply-To: <482C9E73.2040202@free.fr>
Nicolas 2P wrote:
> When setting arp_interval parameter to a very low value, delta_in_ticks
> for next arp might become 0, causing an infinite loop.
>
> See http://bugzilla.kernel.org/show_bug.cgi?id=10680
>
> Same problem for miimon parameter already fixed, but fix might be
> enhanced, by using msecs_to_jiffies() function.
>
> Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
>
> --- /usr/src/linux/drivers/net/bonding/bond_main_orig.c 2008-05-13
> 02:00:01.000000000 +0200
> +++ /usr/src/linux/drivers/net/bonding/bond_main.c 2008-05-14
> 14:55:53.000000000 +0200
> @@ -2391,7 +2391,7 @@
> read_lock(&bond->lock);
> }
>
> - delay = ((bond->params.miimon * HZ) / 1000) ? : 1;
> + delay = msecs_to_jiffies(bond->params.miimon);
> read_unlock(&bond->lock);
> queue_delayed_work(bond->wq, &bond->mii_work, delay);
> }
> @@ -2704,7 +2704,7 @@
>
> read_lock(&bond->lock);
>
> - delta_in_ticks = (bond->params.arp_interval * HZ) / 1000;
> + delta_in_ticks = msecs_to_jiffies(bond->params.arp_interval);
>
> if (bond->kill_timers) {
> goto out;
> @@ -2837,7 +2837,7 @@
>
> read_lock(&bond->lock);
>
> - delta_in_ticks = (bond->params.arp_interval * HZ) / 1000;
> + delta_in_ticks = msecs_to_jiffies(bond->params.arp_interval * HZ);
This seems like it should be just:
delta_in_ticks = msecs_to_jiffies(bond->params.arp_interval);
Assuming the interval is in milliseconds, based on the previous usage.
Since it's multiplying by HZ (ticks per second) and dividing by 1000
(milliseconds per second), it was converting from milliseconds to ticks.
Same for the other changes?
Joe
next prev parent reply other threads:[~2008-05-17 20:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-15 20:34 [patch] bondig - arp_interval with low value => Oops Nicolas 2P
2008-05-17 20:20 ` Joe Eykholt [this message]
2008-05-18 3:39 ` [Bonding-devel] " Jay Vosburgh
2008-06-10 22:19 ` Jeff Garzik
2008-06-10 22:30 ` Jay Vosburgh
2008-06-10 22:39 ` Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=482F3DF6.7080403@nuovasystems.com \
--to=jre@nuovasystems.com \
--cc=bonding-devel@lists.sourceforge.net \
--cc=davem@davemloft.net \
--cc=fubar@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-net@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nicolas.2p.debian@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox