netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roopa Prabhu <roopa@cumulusnetworks.com>
To: vyasevic@redhat.com
Cc: David Miller <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next] rtnl: Add support for netdev event to link messages
Date: Wed, 29 Mar 2017 09:37:45 -0700	[thread overview]
Message-ID: <58DBE2D9.10509@cumulusnetworks.com> (raw)
In-Reply-To: <2fe31fc9-2837-91a7-e2a4-7937bb15cf3d@redhat.com>

On 3/29/17, 5:23 AM, Vlad Yasevich wrote:
> [ resending to list.  hit the wrong reply button last time ]
>
> On 03/27/2017 06:58 PM, David Miller wrote:
>> From: Vladislav Yasevich <vyasevich@gmail.com>
>> Date: Sat, 25 Mar 2017 21:59:47 -0400
>>
>>> RTNL currently generates notifications on some netdev notifier events.
>>> However, user space has no idea what changed.  All it sees is the
>>> data and has to infer what has changed.  For some events that is not
>>> possible.
>>>
>>> This patch adds a new field to RTM_NEWLINK message called IFLA_EVENT
>>> that would have an encoding of the which event triggered this
>>> notification.  Currectly, only 2 events (NETDEV_NOTIFY_PEERS and
>>> NETDEV_MTUCHANGED) are supported.  These events could be interesting
>>> in the virt space to trigger additional configuration commands to VMs.
>>> Other events of interest may be added later.
>>>
>>> Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
>> At what point do we start providing the metadata for the changed
>> values as well?  You'd probably need to provide both the old and
>> new values to cover all cases.
> I don't think if that would be possible because of when events are triggered.
> We send these notifications after all the changes have already been made, so
> it might be tough to carry old data.
>
> Looking at just the two events I am supporting in this patch, we could actually
> supply the old mtu data through a NETDEV_PRECHANGEMTU event, if it is necessary.

But, NETDEV_PRECHANGEMTU will be a unnecessary notification to userspace without
changes. There are already enough notifications generated for links (I know you are not
suggesting adding it here)
> For the use cases I am looking at, it isn't usefull, but easy enough to add.
>
Most of the times a single notification can carry multiple changes, this helps user-space..by
cutting down on notifications in systems with large number of links. I don't see IFLA_EVENT attribute
handle multiple changes..

Given the number of attributes for which events are generated, I think a model where user-space
maintains a cache and diff's the new link object with the old one works best in all cases.

  reply	other threads:[~2017-03-29 16:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-26  1:59 [PATCH net-next] rtnl: Add support for netdev event to link messages Vladislav Yasevich
2017-03-27 22:58 ` David Miller
2017-03-29 12:23   ` Vlad Yasevich
2017-03-29 16:37     ` Roopa Prabhu [this message]
2017-03-29 17:05       ` Vlad Yasevich
2017-03-29 19:11         ` David Ahern
2017-03-30 13:39           ` Vlad Yasevich
2017-03-30 13:47             ` Vlad Yasevich
2017-03-30 14:11               ` David Ahern
2017-03-30 15:21                 ` Vladislav Yasevich
2017-03-30 21:41                   ` David Ahern

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=58DBE2D9.10509@cumulusnetworks.com \
    --to=roopa@cumulusnetworks.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --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).