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: <1377111680.1936.45.camel@joe-AO722>
Date:	Wed, 21 Aug 2013 12:01:20 -0700
From:	Joe Perches <joe@...ches.com>
To:	Arvid Brodin <arvid.brodin@...n.com>
Cc:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	Stephen Hemminger <shemminger@...tta.com>,
	Javier Boticario <jboticario@...il.com>,
	balferreira <balferreira@...glemail.com>,
	David Miller <davem@...emloft.net>
Subject: Re: [PATCH v3] net/hsr: Add support for the High-availability
 Seamless Redundancy protocol (HSRv0)

On Wed, 2013-08-21 at 20:20 +0200, Arvid Brodin wrote:
> High-availability Seamless Redundancy ("HSR") provides instant failover
> redundancy for Ethernet networks. It requires a special network topology where
> all nodes are connected in a ring (each node having two physical network
> interfaces). It is suited for applications that demand high availability and
> very short reaction time.

Hi Arvid.

just trivia:

> diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c
[]
> +static int hsr_dev_xmit(struct sk_buff *skb, struct net_device *dev)
[]
> +	if (likely(res1 == NET_XMIT_SUCCESS || res1 == NET_XMIT_CN ||
> +		   res2 == NET_XMIT_SUCCESS || res2 == NET_XMIT_CN)) {

This might be faster using | instead of ||

[]

> diff --git a/net/hsr/hsr_framereg.c b/net/hsr/hsr_framereg.c
[]
> +
> +/* above(a, b) - return 1 if a > b, 0 otherwise.
> + */
> +static bool above(u16 a, u16 b)
> +{
> +	/* Remove inconsistency where above(a, b) == below(a, b) */
> +	if ((int) b - a == 32768)
> +		return 0;
> +
> +	return (((s16) (b - a)) < 0);
> +}
> +#define below(a, b)		above((b), (a))
> +#define above_or_eq(a, b)	(!below((a), (b)))
> +#define below_or_eq(a, b)	(!above((a), (b)))

These may be overly generic macro names given
these only take u16.


--
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