[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170123090211.6bcd2afc@xeon-e3>
Date: Mon, 23 Jan 2017 09:02:11 -0800
From: Stephen Hemminger <stephen@...workplumber.org>
To: Roopa Prabhu <roopa@...ulusnetworks.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org,
ramanb@...ulusnetworks.com, jbenc@...hat.com, pshelar@....org
Subject: Re: [PATCH cumulus-4.1.y 2/5] vxlan: don't replace fdb entry if
nothing changed
On Fri, 20 Jan 2017 23:40:07 -0800
Roopa Prabhu <roopa@...ulusnetworks.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 ...
Powered by blists - more mailing lists