History

ethtool: add LINKINFO_NTF notification

Send ETHTOOL_MSG_LINKINFO_NTF notification message whenever device link settings are modified using ETHTOOL_MSG_LINKINFO_SET netlink message or ETHTOOL_SLINKSETTINGS or ETHTOOL_SSET ioctl commands. The notification message has the same format as reply to LINKINFO_GET request. ETHTOOL_MSG_LINKINFO_SET netlink request only triggers the notification if there is a change but the ioctl command handlers do not check if there is an actual change and trigger the notification whenever the commands are executed. As all work is done by ethnl_default_notify() handler and callback functions introduced to handle LINKINFO_GET requests, all that remains is adding entries for ETHTOOL_MSG_LINKINFO_NTF into ethnl_notify_handlers and ethnl_default_notify_ops lookup tables and calls to ethtool_notify() where needed.

Michal Kubecek committed 6 years ago

Commit 73286731 parent 5cf2a545 files · +16 −2Browse files

Showing the changes to include/uapi/linux (1 of 5 files). Show all

Unified · Split

include/uapi/linux/ethtool_netlink.h+1−0
@@ -28,6 +28,7 @@ enum { · 27 unmodified lines
2828 ETHTOOL_MSG_KERNEL_NONE,
2929 ETHTOOL_MSG_STRSET_GET_REPLY,
3030 ETHTOOL_MSG_LINKINFO_GET_REPLY,
31+ ETHTOOL_MSG_LINKINFO_NTF,
3132
3233 /* add new constants above here */
3334 __ETHTOOL_MSG_KERNEL_CNT,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t