diff options
author | Jiri Pirko <jpirko@redhat.com> | 2012-01-24 00:16:00 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-01-24 15:51:00 -0500 |
commit | b82b9183d4f18f9b8c4bb31f223eb6c79b734eb0 (patch) | |
tree | c93bb04e52255fe3e313ce4469dd2df6c2a62789 /include/linux | |
parent | c11bf1c8baff170fa478adc04964da519d160e62 (diff) |
team: send only changed options/ports via netlink
This patch changes event message behaviour to send only updated records
instead of whole list. This fixes bug on which userspace receives non-actual
data in case multiple events occur in row.
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/if_team.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/if_team.h b/include/linux/if_team.h index 828181fbad5d..58404b0c5010 100644 --- a/include/linux/if_team.h +++ b/include/linux/if_team.h | |||
@@ -46,6 +46,10 @@ struct team_port { | |||
46 | u32 speed; | 46 | u32 speed; |
47 | u8 duplex; | 47 | u8 duplex; |
48 | 48 | ||
49 | /* Custom gennetlink interface related flags */ | ||
50 | bool changed; | ||
51 | bool removed; | ||
52 | |||
49 | struct rcu_head rcu; | 53 | struct rcu_head rcu; |
50 | }; | 54 | }; |
51 | 55 | ||
@@ -72,6 +76,10 @@ struct team_option { | |||
72 | enum team_option_type type; | 76 | enum team_option_type type; |
73 | int (*getter)(struct team *team, void *arg); | 77 | int (*getter)(struct team *team, void *arg); |
74 | int (*setter)(struct team *team, void *arg); | 78 | int (*setter)(struct team *team, void *arg); |
79 | |||
80 | /* Custom gennetlink interface related flags */ | ||
81 | bool changed; | ||
82 | bool removed; | ||
75 | }; | 83 | }; |
76 | 84 | ||
77 | struct team_mode { | 85 | struct team_mode { |
@@ -207,6 +215,7 @@ enum { | |||
207 | TEAM_ATTR_OPTION_CHANGED, /* flag */ | 215 | TEAM_ATTR_OPTION_CHANGED, /* flag */ |
208 | TEAM_ATTR_OPTION_TYPE, /* u8 */ | 216 | TEAM_ATTR_OPTION_TYPE, /* u8 */ |
209 | TEAM_ATTR_OPTION_DATA, /* dynamic */ | 217 | TEAM_ATTR_OPTION_DATA, /* dynamic */ |
218 | TEAM_ATTR_OPTION_REMOVED, /* flag */ | ||
210 | 219 | ||
211 | __TEAM_ATTR_OPTION_MAX, | 220 | __TEAM_ATTR_OPTION_MAX, |
212 | TEAM_ATTR_OPTION_MAX = __TEAM_ATTR_OPTION_MAX - 1, | 221 | TEAM_ATTR_OPTION_MAX = __TEAM_ATTR_OPTION_MAX - 1, |
@@ -227,6 +236,7 @@ enum { | |||
227 | TEAM_ATTR_PORT_LINKUP, /* flag */ | 236 | TEAM_ATTR_PORT_LINKUP, /* flag */ |
228 | TEAM_ATTR_PORT_SPEED, /* u32 */ | 237 | TEAM_ATTR_PORT_SPEED, /* u32 */ |
229 | TEAM_ATTR_PORT_DUPLEX, /* u8 */ | 238 | TEAM_ATTR_PORT_DUPLEX, /* u8 */ |
239 | TEAM_ATTR_PORT_REMOVED, /* flag */ | ||
230 | 240 | ||
231 | __TEAM_ATTR_PORT_MAX, | 241 | __TEAM_ATTR_PORT_MAX, |
232 | TEAM_ATTR_PORT_MAX = __TEAM_ATTR_PORT_MAX - 1, | 242 | TEAM_ATTR_PORT_MAX = __TEAM_ATTR_PORT_MAX - 1, |