From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH V6 net-next 2/2] bonding: Prevent duplicate userspace notification Date: Sat, 27 May 2017 15:41:57 -0600 Message-ID: <0feb66f9-ccce-0358-f866-b3228982e3cf@gmail.com> References: <1495894476-9726-1-git-send-email-vyasevic@redhat.com> <1495894476-9726-3-git-send-email-vyasevic@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: roopa@cumulusnetworks.com, jiri@resnulli.us, vfalico@gmail.com, andy@greyhouse.net, Vladislav Yasevich , David Ahern To: Vladislav Yasevich , netdev@vger.kernel.org Return-path: Received: from mail-pg0-f67.google.com ([74.125.83.67]:34799 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750750AbdE0VmB (ORCPT ); Sat, 27 May 2017 17:42:01 -0400 Received: by mail-pg0-f67.google.com with SMTP id u187so2401689pgb.1 for ; Sat, 27 May 2017 14:42:01 -0700 (PDT) In-Reply-To: <1495894476-9726-3-git-send-email-vyasevic@redhat.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 5/27/17 8:14 AM, Vladislav Yasevich wrote: > Whenever a user changes bonding options, a NETDEV_CHANGEINFODATA > notificatin is generated which results in a rtnelink message to > be sent. While runnig 'ip monitor', we can actually see 2 messages, > one a result of the event, and the other a result of state change > that is generated bo netdev_state_change(). However, this is not > always the case. If bonding changes were done via sysfs or ifenslave > (old ioctl interface), then only 1 message is seen. > > This patch removes duplicate messages in the case of using netlink > to configure bonding. It introduceds a separte function that > triggers a netdev event and uses that function in the syfs and ioctl > cases. > > This was discovered while auditing all the different envents and > continues the effort of cleaning up duplicated netlink messages. > > CC: David Ahern > CC: Jiri Pirko > Signed-off-by: Vladislav Yasevich > --- > drivers/net/bonding/bond_main.c | 3 ++- > drivers/net/bonding/bond_options.c | 27 +++++++++++++++++++++++++-- > include/net/bond_options.h | 2 ++ > 3 files changed, 29 insertions(+), 3 deletions(-) > Acked-by: David Ahern