lkml.org 
[lkml]   [2019]   [Dec]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH net-next v8 04/14] ethtool: support for netlink notifications
From
Date


On 12/22/2019 3:45 PM, Michal Kubecek wrote:
> Add infrastructure for ethtool netlink notifications. There is only one
> multicast group "monitor" which is used to notify userspace about changes
> and actions performed. Notification messages (types using suffix _NTF)
> share the format with replies to GET requests.
>
> Notifications are supposed to be broadcasted on every configuration change,
> whether it is done using the netlink interface or ioctl one. Netlink SET
> requests only trigger a notification if some data is actually changed.
>
> To trigger an ethtool notification, both ethtool netlink and external code
> use ethtool_notify() helper. This helper requires RTNL to be held and may
> sleep. Handlers sending messages for specific notification message types
> are registered in ethnl_notify_handlers array. As notifications can be
> triggered from other code, ethnl_ok flag is used to prevent an attempt to
> send notification before genetlink family is registered.
>
> Signed-off-by: Michal Kubecek <mkubecek@suse.cz>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian

\
 
 \ /
  Last update: 2019-12-24 05:17    [W:0.119 / U:20.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site