Thread (14 messages) 14 messages, 5 authors, 2017-05-02

Re: [PATCH net-next V3 2/2] rtnl: Add support for netdev event attribute to link messages

From: Vlad Yasevich <hidden>
Date: 2017-05-01 13:35:24

On 04/28/2017 12:38 PM, Jiri Pirko wrote:
Thu, Apr 27, 2017 at 09:59:38PM CEST, dsa@cumulusnetworks.com wrote:
quoted
On 4/27/17 1:43 PM, Vlad Yasevich wrote:
quoted
quoted
For example, NETDEV_CHANGEINFODATA is only for bonds though nothing
about the name suggests it is a bonding notification. This one was added
specifically to notify userspace (d4261e5650004), yet seems to happen
only during a changelink and that already generates a RTM_NEWLINK
message via do_setlink. Since the rtnetlink_event message does not
contain anything "NETDEV_CHANGEINFODATA" related what purpose does it
really serve besides duplicating netlink messages to userspace.
I am not sure about this one, but if you have an app trying to monitor
for this event, it can't really since there is no info in the netlink message.
I cc'ed Jiri on this thread hoping he would explain the intent.

I propose it gets removed.
Hmm, I don't really recall. But looking at it now, I agree it is
redundant.
So, it looks like the notifier might be there to account for the ioctl/sysfs
interfaces.

Additionally, the message is not generated from do_setlink() if the devices is
down, so notifier accounts for that as well.

I guess, basic question is whether data carried in NETDEV_CHANGEINFODATA is useful
to user space?  If yes (I can possibly see some managements apps that might be interested
in it), then we shouldn't just remove it.  Possible solutions to eliminate duplicates
would be to move the notifier call into non-rtnl code paths...

Also, may be netdev_state_change() should call rtmsg_ifinfo() unconditionally?

-vlad
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help