aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/if_team.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/if_team.h')
-rw-r--r--include/linux/if_team.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/include/linux/if_team.h b/include/linux/if_team.h
index cfd21e3d5506..4474557904f6 100644
--- a/include/linux/if_team.h
+++ b/include/linux/if_team.h
@@ -112,6 +112,10 @@ struct team_mode_ops {
112 void (*port_disabled)(struct team *team, struct team_port *port); 112 void (*port_disabled)(struct team *team, struct team_port *port);
113}; 113};
114 114
115extern int team_modeop_port_enter(struct team *team, struct team_port *port);
116extern void team_modeop_port_change_dev_addr(struct team *team,
117 struct team_port *port);
118
115enum team_option_type { 119enum team_option_type {
116 TEAM_OPTION_TYPE_U32, 120 TEAM_OPTION_TYPE_U32,
117 TEAM_OPTION_TYPE_STRING, 121 TEAM_OPTION_TYPE_STRING,
@@ -236,7 +240,26 @@ static inline struct team_port *team_get_port_by_index_rcu(struct team *team,
236 return NULL; 240 return NULL;
237} 241}
238 242
239extern int team_port_set_team_dev_addr(struct team_port *port); 243static inline struct team_port *
244team_get_first_port_txable_rcu(struct team *team, struct team_port *port)
245{
246 struct team_port *cur;
247
248 if (likely(team_port_txable(port)))
249 return port;
250 cur = port;
251 list_for_each_entry_continue_rcu(cur, &team->port_list, list)
252 if (team_port_txable(port))
253 return cur;
254 list_for_each_entry_rcu(cur, &team->port_list, list) {
255 if (cur == port)
256 break;
257 if (team_port_txable(port))
258 return cur;
259 }
260 return NULL;
261}
262
240extern int team_options_register(struct team *team, 263extern int team_options_register(struct team *team,
241 const struct team_option *option, 264 const struct team_option *option,
242 size_t option_count); 265 size_t option_count);