When netdev events happen, a rtnetlink_event() handler will send messages for every event in it's white list. These messages contain current information about a particular device, but they do not include the iformation about which event just happened. So, it is impossible to tell what just happend for these events. This patch adds a new extension to RTM_NEWLINK message called IFLA_EVENT that would have an encoding of event that triggered this message. This would allow the the message consumer to easily determine if it needs to perform certain actions.
Showing the changes to include/uapi/linux (1 of 4 files). Show all
Unified · Split
| @@ -157,6 +157,7 @@ enum { · 156 unmodified lines | ||
| 157 | 157 | IFLA_GSO_MAX_SIZE, |
| 158 | 158 | IFLA_PAD, |
| 159 | 159 | IFLA_XDP, |
| 160 | + IFLA_EVENT, | |
| 160 | 161 | __IFLA_MAX |
| 161 | 162 | }; |
| 162 | 163 | |
| @@ -911,4 +912,14 @@ enum { · 748 unmodified lines | ||
| 911 | 912 | |
| 912 | 913 | #define IFLA_XDP_MAX (__IFLA_XDP_MAX - 1) |
| 913 | 914 | |
| 915 | +enum { | |
| 916 | + IFLA_EVENT_NONE, | |
| 917 | + IFLA_EVENT_REBOOT, /* internal reset / reboot */ | |
| 918 | + IFLA_EVENT_FEATURES, /* change in offload features */ | |
| 919 | + IFLA_EVENT_BONDING_FAILOVER, /* change in active slave */ | |
| 920 | + IFLA_EVENT_NOTIFY_PEERS, /* re-sent grat. arp/ndisc */ | |
| 921 | + IFLA_EVENT_IGMP_RESEND, /* re-sent IGMP JOIN */ | |
| 922 | + IFLA_EVENT_BONDING_OPTIONS, /* change in bonding options */ | |
| 923 | +}; | |
| 924 | + | |
| 914 | 925 | #endif /* _UAPI_LINUX_IF_LINK_H */ |