netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Kubecek <mkubecek@suse.cz>
To: Flavio Leitner <fbl@redhat.com>
Cc: netdev@vger.kernel.org, Jay Vosburgh <fubar@us.ibm.com>,
	Andy Gospodarek <andy@greyhouse.net>
Subject: Re: [PATCH] bonding: start slaves with link down for ARP monitor
Date: Sat, 14 Apr 2012 21:09:29 +0200	[thread overview]
Message-ID: <20120414190929.GA8424@lion.mk-sys.cz> (raw)
In-Reply-To: <20120414015319.11e196d4@asterix.rh>

On Sat, Apr 14, 2012 at 01:53:19AM -0300, Flavio Leitner wrote:
> On Thu, 12 Apr 2012 20:38:09 +0200
> Michal Kubecek <mkubecek@suse.cz> wrote:
> >  	new_slave->last_arp_rx = jiffies;
> > +	if (bond->params.arp_interval)
> > +		new_slave->last_arp_rx -=
> > +			(msecs_to_jiffies(bond->params.arp_interval) + 1);
> 
> 
> I don't see the point of checking bond->params.arp_interval.
> Why not simply:
> 
> - 	new_slave->last_arp_rx = jiffies;
> +	/* put it behind to avoid fake initial link up detection */
> +	new_slave->last_arp_rx = jiffies -
> +		 (msecs_to_jiffies(bond->params.arp_interval) + 1);

The idea was to avoid calculation when ARP monitoring is off. But
thinking it over again, this part of the code is not that performance
critical and the conditional jump may be in fact worse than the two
instructions it would jump over.

                                                       Michal Kubecek

      parent reply	other threads:[~2012-04-14 19:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-12 18:38 [PATCH] bonding: start slaves with link down for ARP monitor Michal Kubecek
2012-04-14  4:53 ` Flavio Leitner
2012-04-14  5:21   ` Jay Vosburgh
2012-04-14 19:25     ` Michal Kubecek
2012-04-14 19:09   ` Michal Kubecek [this message]

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=20120414190929.GA8424@lion.mk-sys.cz \
    --to=mkubecek@suse.cz \
    --cc=andy@greyhouse.net \
    --cc=fbl@redhat.com \
    --cc=fubar@us.ibm.com \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).