[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <52150F95.7060004@cogentembedded.com>
Date: Wed, 21 Aug 2013 23:05:57 +0400
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: Joe Perches <joe@...ches.com>
CC: Arvid Brodin <arvid.brodin@...n.com>,
"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)
Hello.
On 08/21/2013 11:01 PM, Joe Perches 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 ||
Doesn't || use shortcut evaluation in C? I.e. if the 1st == evaluates to
true, other comparisons are not even done.
WBR, Sergei
--
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