Return-Path: Date: Wed, 14 May 2014 08:42:51 -0700 From: Stephen Hemminger Message-ID: <20140514084251.317ed026@nehalam.linuxnetplumber.net> In-Reply-To: <1400080168-16625-3-git-send-email-vyasevic@redhat.com> References: <1400080168-16625-1-git-send-email-vyasevic@redhat.com> <1400080168-16625-3-git-send-email-vyasevic@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Bridge] [PATCH net-next 2/8] bridge: Keep track of ports capable of automatic discovery. List-Id: Linux Ethernet Bridging List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vlad Yasevich Cc: mst@redhat.com, netdev@vger.kernel.org, bridge@lists.linux-foundation.org, jhs@mojatatu.com, john.r.fastabend@intel.com, shemminger@vyatta.com On Wed, 14 May 2014 11:09:22 -0400 Vlad Yasevich wrote: > @@ -58,6 +61,7 @@ static int store_flag(struct net_bridge_port *p, unsigned long v, > > if (flags != p->flags) { > p->flags = flags; > + br_port_flags_change(p, old_flags ^ flags); You are also xoring twice. Why not: store_flag() if (flags != p->flags) { br_port_flags_change(p, flags); p->flags = flags; br_ifinfo_notify(RTM_NEWLINK, p);