lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120414190929.GA8424@lion.mk-sys.cz>
Date:	Sat, 14 Apr 2012 21:09:29 +0200
From:	Michal Kubecek <mkubecek@...e.cz>
To:	Flavio Leitner <fbl@...hat.com>
Cc:	netdev@...r.kernel.org, Jay Vosburgh <fubar@...ibm.com>,
	Andy Gospodarek <andy@...yhouse.net>
Subject: Re: [PATCH] bonding: start slaves with link down for ARP monitor

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@...e.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

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ