netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vladislav Yasevich <vyasevich@gmail.com>
To: netdev@vger.kernel.org
Cc: dsahern@gmail.com, roopa@cumulusnetworks.com, jiri@resnulli.us,
	vfalico@gmail.com, andy@greyhouse.net,
	Vladislav Yasevich <vyasevic@redhat.com>
Subject: [PATCH v5 net-next 0/2] rtnetlink: Updates to rtnetlink_event()
Date: Thu, 25 May 2017 11:31:53 -0400	[thread overview]
Message-ID: <1495726316-27626-1-git-send-email-vyasevic@redhat.com> (raw)

This is a version 5 series came out of the conversation that started
as a result my first attempt to add netdevice event info to netlink messages.

First is the patch to add IFLA_EVENT attribute to the netlink message.  It
supports only currently white-listed events.
Like before, this is just an attribute that gets added to the rtnetlink
message only when the messaged was generated as a result of a netdev event.
In my case, this is necessary since I want to trap NETDEV_NOTIFY_PEERS
event (also possibly NETDEV_RESEND_IGMP event) and perform certain actions
in user space.  This is not possible since the messages generated as
a result of netdev events do not usually contain any changed data.  They
are just notifications.  This patch exposes this notification type to
userspace.

Second, I remove duplicate messages that a result of a change to bonding
options.  If netlink is used to configure bonding options, 2 messages
are generated, one as a result NETDEV_CHANGEINFODATA event triggered by
bonding code and one a result of device state changes triggered by
netdev_state_change (called from do_setlink).


V5: Rebased.  Added iproute2 patch to the series.
V4:
  * Removed the patch the removed NETDEV_CHANGENAME from event whitelist.
    It doesn't trigger duplicate messages since name changes can only be
    done while device is down and netdev_state_change() doesn't report
    changes while device is down.
  * Added a patch to clean-up duplicate messages on bonding option changes.

V3: Rebased.  Cleaned-up duplicate event.

V2: Added missed events (from David Ahern)

Vladislav Yasevich (2):
  rtnl: Add support for netdev event to link messages
  bonding: Prevent duplicate userspace notification

 drivers/net/bonding/bond_main.c    |  3 +-
 drivers/net/bonding/bond_options.c | 27 +++++++++++++++--
 include/linux/rtnetlink.h          |  3 +-
 include/net/bond_options.h         |  2 ++
 include/uapi/linux/if_link.h       | 11 +++++++
 net/core/dev.c                     |  2 +-
 net/core/rtnetlink.c               | 62 ++++++++++++++++++++++++++++++++------
 7 files changed, 96 insertions(+), 14 deletions(-)

-- 
2.7.4

             reply	other threads:[~2017-05-25 15:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-25 15:31 Vladislav Yasevich [this message]
2017-05-25 15:31 ` [PATCH V5 1/2] rtnl: Add support for netdev event to link messages Vladislav Yasevich
2017-05-26 19:40   ` David Ahern
2017-05-26 20:01     ` Vlad Yasevich
2017-05-26 20:04       ` David Ahern
2017-05-25 15:31 ` [PATCH V5 2/2] bonding: Prevent duplicate userspace notification Vladislav Yasevich
2017-05-26 19:46   ` David Ahern
2017-05-25 15:31 ` [PATCH V5 iproute] ip: Add support for netdev events to monitor Vladislav Yasevich
2017-05-26 18:30 ` [PATCH v5 net-next 0/2] rtnetlink: Updates to rtnetlink_event() David Miller

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=1495726316-27626-1-git-send-email-vyasevic@redhat.com \
    --to=vyasevich@gmail.com \
    --cc=andy@greyhouse.net \
    --cc=dsahern@gmail.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=roopa@cumulusnetworks.com \
    --cc=vfalico@gmail.com \
    --cc=vyasevic@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).