]> git.baikalelectronics.ru Git - kernel.git/commit
bonding: Prevent duplicate userspace notification
authorVlad Yasevich <vyasevich@gmail.com>
Sat, 27 May 2017 14:14:35 +0000 (10:14 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sat, 27 May 2017 22:51:41 +0000 (18:51 -0400)
commit38c0086df94dadc416179ae4aa697c070a39a033
treee71e607d845b7a87f50eace22efa40f63621081e
parent92af09c841f0ed41c9446a9597b5719cc7265c87
bonding: Prevent duplicate userspace notification

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 <dsa@cumulusnetworks.com>
CC: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
Acked-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_main.c
drivers/net/bonding/bond_options.c
include/net/bond_options.h