netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Vladislav Yasevich <vyasevich@gmail.com>, netdev@vger.kernel.org
Cc: roopa@cumulusnetworks.com, jiri@resnulli.us, vfalico@gmail.com,
	andy@greyhouse.net, Vladislav Yasevich <vyasevic@redhat.com>
Subject: Re: [PATCH V5 1/2] rtnl: Add support for netdev event to link messages
Date: Fri, 26 May 2017 13:40:54 -0600	[thread overview]
Message-ID: <0d252e48-cbd0-5d5d-1e30-9c7e79ea9d01@gmail.com> (raw)
In-Reply-To: <1495726316-27626-2-git-send-email-vyasevic@redhat.com>

On 5/25/17 9:31 AM, Vladislav Yasevich wrote:
> @@ -911,4 +912,14 @@ enum {
>  
>  #define IFLA_XDP_MAX (__IFLA_XDP_MAX - 1)
>  
> +enum {
> +	IFLA_EVENT_UNSPEC,
> +	IFLA_EVENT_REBOOT,
> +	IFLA_EVENT_FEAT_CHANGE,
> +	IFLA_EVENT_BONDING_FAILOVER,
> +	IFLA_EVENT_NOTIFY_PEERS,
> +	IFLA_EVENT_RESEND_IGMP,
> +	IFLA_EVENT_CHANGE_INFO_DATA,
> +};
> +
>  #endif /* _UAPI_LINUX_IF_LINK_H */

I agree these are unique events that userspace might care about.

I'd prefer better names for the userspace api for a couple of those
along with a description in the header file so userspace knows why the
event was generated.

How about something like this:

enum {
	IFLA_EVENT_NONE,
	IFLA_EVENT_REBOOT,		/* internal reset / reboot */
	IFLA_EVENT_FEATURES,		/* change in offload features */
	IFLA_EVENT_BONDING_FAILOVER,	/* change in active slave */
	IFLA_EVENT_NOTIFY_PEERS,	/* re-sent grat. arp/ndisc */
	IFLA_EVENT_IGMP_RESEND,		/* re-sent IGMP JOIN */
	IFLA_EVENT_BONDING_OPTIONS,	/* change in bonding options */
};

Also, generically the IFLA_EVENT attribute should be considered
independent of NETDEV_ events.

For example, userspace should be notified if the speed / duplex for a
device changes, so we could have another one of these -- e.g.,
IFLA_EVENT_SPEED -- that does not correlate to NETDEV_SPEED since
nothing internal to the network stack cares about speed changes, or
perhaps more generically it is IFLA_EVENT_LINK_SETTING.

The rest of the patch looks ok to me.

  reply	other threads:[~2017-05-26 19:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-25 15:31 [PATCH v5 net-next 0/2] rtnetlink: Updates to rtnetlink_event() Vladislav Yasevich
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 [this message]
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=0d252e48-cbd0-5d5d-1e30-9c7e79ea9d01@gmail.com \
    --to=dsahern@gmail.com \
    --cc=andy@greyhouse.net \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=roopa@cumulusnetworks.com \
    --cc=vfalico@gmail.com \
    --cc=vyasevic@redhat.com \
    --cc=vyasevich@gmail.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).