public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Joe Perches <joe@perches.com>
Cc: Arvid Brodin <arvid.brodin@xdin.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Stephen Hemminger <shemminger@vyatta.com>,
	Javier Boticario <jboticario@gmail.com>,
	balferreira <balferreira@googlemail.com>,
	David Miller <davem@davemloft.net>
Subject: Re: [PATCH v3] net/hsr: Add support for the High-availability Seamless Redundancy protocol (HSRv0)
Date: Wed, 21 Aug 2013 23:05:57 +0400	[thread overview]
Message-ID: <52150F95.7060004@cogentembedded.com> (raw)
In-Reply-To: <1377111680.1936.45.camel@joe-AO722>

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

  reply	other threads:[~2013-08-21 19:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-21 18:20 [PATCH v3] net/hsr: Add support for the High-availability Seamless Redundancy protocol (HSRv0) Arvid Brodin
2013-08-21 19:01 ` Joe Perches
2013-08-21 19:05   ` Sergei Shtylyov [this message]
2013-08-21 19:38     ` Joe Perches
2013-08-30 19:54 ` David Miller
2013-09-03 15:30   ` Arvid Brodin

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=52150F95.7060004@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=arvid.brodin@xdin.com \
    --cc=balferreira@googlemail.com \
    --cc=davem@davemloft.net \
    --cc=jboticario@gmail.com \
    --cc=joe@perches.com \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@vyatta.com \
    /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