public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Roopa Prabhu <roopa@cumulusnetworks•com>
To: Stephen Hemminger <stephen@networkplumber•org>
Cc: davem@davemloft•net, netdev@vger•kernel.org,
	ramanb@cumulusnetworks•com, jbenc@redhat•com, pshelar@ovn•org
Subject: Re: [PATCH cumulus-4.1.y 2/5] vxlan: don't replace fdb entry if nothing changed
Date: Mon, 23 Jan 2017 16:14:09 -0800	[thread overview]
Message-ID: <58869C51.4080101@cumulusnetworks.com> (raw)
In-Reply-To: <20170123090211.6bcd2afc@xeon-e3>

On 1/23/17, 9:02 AM, Stephen Hemminger wrote:
> On Fri, 20 Jan 2017 23:40:07 -0800
> Roopa Prabhu <roopa@cumulusnetworks•com> wrote:
>
>> +	if (!vxlan_addr_equal(&rd->remote_ip, ip) ||
>> +	    rd->remote_port != port ||
>> +	    rd->remote_vni != vni ||
>> +	    rd->remote_ifindex != ifindex) {
>> +		dst_cache_reset(&rd->dst_cache);
>> +		rd->remote_ip = *ip;
>> +		rd->remote_port = port;
>> +		rd->remote_vni = vni;
>> +		rd->remote_ifindex = ifindex;
>> +		return 1;
>> +	}
>> +
> I think it would be clearer if negative logic was avoided.
>
> 	if (vxlan_addr_equal(&rd->remote_ip, ip) &&
> 	    rd->remote_port == port &&
> 	    rd->remote_vni == vni &&
>             rd->ermote_ifindex == ifndex)
> 		return 1;
>
> 	dst_cache_reset ...

ack, this was an accidental hit on send as well.
It is on my upstream patch stack..but i think this patch is not really needed upstream because
a previous call to vxlan_fdb_find_rdst in vxlan_fdb_replace does the same thing.

I will test again and repost if needed, thanks.

  reply	other threads:[~2017-01-24  0:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-21  7:40 [PATCH cumulus-4.1.y 1/5] vxlan: flush fdb entries on oper down Roopa Prabhu
2017-01-21  7:40 ` [PATCH cumulus-4.1.y 2/5] vxlan: don't replace fdb entry if nothing changed Roopa Prabhu
2017-01-23 17:02   ` Stephen Hemminger
2017-01-24  0:14     ` Roopa Prabhu [this message]
2017-01-21  7:40 ` [PATCH cumulus-4.1.y 3/5] vxlan: enforce precedence for static over dynamic fdb entry Roopa Prabhu
2017-01-21  7:40 ` [PATCH cumulus-4.1.y 4/5] vxlan: don't flush static fdb entries on admin down Roopa Prabhu
2017-01-21  9:25   ` kbuild test robot
2017-01-21  7:40 ` [PATCH cumulus-4.1.y 5/5] vxlan: do not age static remote mac entries Roopa Prabhu
2017-01-21  7:41 ` [PATCH cumulus-4.1.y 1/5] vxlan: flush fdb entries on oper down Roopa Prabhu
2017-01-21  8:54 ` kbuild test robot
2017-01-21  8:58 ` kbuild test robot
2017-01-23 16:59 ` Stephen Hemminger
2017-01-24  0:11   ` Roopa Prabhu

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=58869C51.4080101@cumulusnetworks.com \
    --to=roopa@cumulusnetworks$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=jbenc@redhat$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=pshelar@ovn$(echo .)org \
    --cc=ramanb@cumulusnetworks$(echo .)com \
    --cc=stephen@networkplumber$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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