Lines Matching full:team

3  * drivers/net/team/team_mode_loadbalance.c - Load-balancing mode for team
17 static rx_handler_result_t lb_receive(struct team *team, struct team_port *port, in lb_receive() argument
32 typedef struct team_port *lb_select_tx_port_func_t(struct team *,
58 struct team *team; member
75 static struct lb_priv *get_lb_priv(struct team *team) in get_lb_priv() argument
77 return (struct lb_priv *) &team->mode_priv; in get_lb_priv()
96 static void lb_tx_hash_to_port_mapping_null_port(struct team *team, in lb_tx_hash_to_port_mapping_null_port() argument
99 struct lb_priv *lb_priv = get_lb_priv(team); in lb_tx_hash_to_port_mapping_null_port()
114 team_options_change_check(team); in lb_tx_hash_to_port_mapping_null_port()
118 static struct team_port *lb_hash_select_tx_port(struct team *team, in lb_hash_select_tx_port() argument
121 int port_index = team_num_to_port_index(team, hash); in lb_hash_select_tx_port()
123 return team_get_port_by_index_rcu(team, port_index); in lb_hash_select_tx_port()
127 static struct team_port *lb_htpm_select_tx_port(struct team *team, in lb_htpm_select_tx_port() argument
130 struct lb_priv *lb_priv = get_lb_priv(team); in lb_htpm_select_tx_port()
137 return lb_hash_select_tx_port(team, hash); in lb_htpm_select_tx_port()
217 static bool lb_transmit(struct team *team, struct sk_buff *skb) in lb_transmit() argument
219 struct lb_priv *lb_priv = get_lb_priv(team); in lb_transmit()
227 port = select_tx_port_func(team, hash); in lb_transmit()
230 if (team_dev_queue_xmit(team, port, skb)) in lb_transmit()
240 static void lb_bpf_func_get(struct team *team, struct team_gsetter_ctx *ctx) in lb_bpf_func_get() argument
242 struct lb_priv *lb_priv = get_lb_priv(team); in lb_bpf_func_get()
281 static int lb_bpf_func_set(struct team *team, struct team_gsetter_ctx *ctx) in lb_bpf_func_set() argument
283 struct lb_priv *lb_priv = get_lb_priv(team); in lb_bpf_func_set()
305 lockdep_is_held(&team->lock)); in lb_bpf_func_set()
318 static void lb_bpf_func_free(struct team *team) in lb_bpf_func_free() argument
320 struct lb_priv *lb_priv = get_lb_priv(team); in lb_bpf_func_free()
328 lockdep_is_held(&team->lock)); in lb_bpf_func_free()
332 static void lb_tx_method_get(struct team *team, struct team_gsetter_ctx *ctx) in lb_tx_method_get() argument
334 struct lb_priv *lb_priv = get_lb_priv(team); in lb_tx_method_get()
339 lockdep_is_held(&team->lock)); in lb_tx_method_get()
345 static int lb_tx_method_set(struct team *team, struct team_gsetter_ctx *ctx) in lb_tx_method_set() argument
347 struct lb_priv *lb_priv = get_lb_priv(team); in lb_tx_method_set()
357 static void lb_tx_hash_to_port_mapping_init(struct team *team, in lb_tx_hash_to_port_mapping_init() argument
360 struct lb_priv *lb_priv = get_lb_priv(team); in lb_tx_hash_to_port_mapping_init()
366 static void lb_tx_hash_to_port_mapping_get(struct team *team, in lb_tx_hash_to_port_mapping_get() argument
369 struct lb_priv *lb_priv = get_lb_priv(team); in lb_tx_hash_to_port_mapping_get()
377 static int lb_tx_hash_to_port_mapping_set(struct team *team, in lb_tx_hash_to_port_mapping_set() argument
380 struct lb_priv *lb_priv = get_lb_priv(team); in lb_tx_hash_to_port_mapping_set()
384 list_for_each_entry(port, &team->port_list, list) { in lb_tx_hash_to_port_mapping_set()
395 static void lb_hash_stats_init(struct team *team, in lb_hash_stats_init() argument
398 struct lb_priv *lb_priv = get_lb_priv(team); in lb_hash_stats_init()
404 static void lb_hash_stats_get(struct team *team, struct team_gsetter_ctx *ctx) in lb_hash_stats_get() argument
406 struct lb_priv *lb_priv = get_lb_priv(team); in lb_hash_stats_get()
413 static void lb_port_stats_init(struct team *team, in lb_port_stats_init() argument
422 static void lb_port_stats_get(struct team *team, struct team_gsetter_ctx *ctx) in lb_port_stats_get() argument
438 struct team *team) in __lb_stats_info_refresh_check() argument
464 struct team *team; in lb_stats_refresh() local
478 team = lb_priv_ex->team; in lb_stats_refresh()
479 lb_priv = get_lb_priv(team); in lb_stats_refresh()
481 if (!mutex_trylock(&team->lock)) { in lb_stats_refresh()
495 changed |= __lb_stats_info_refresh_check(s_info, team); in lb_stats_refresh()
498 list_for_each_entry(port, &team->port_list, list) { in lb_stats_refresh()
509 changed |= __lb_stats_info_refresh_check(s_info, team); in lb_stats_refresh()
513 team_options_change_check(team); in lb_stats_refresh()
518 mutex_unlock(&team->lock); in lb_stats_refresh()
521 static void lb_stats_refresh_interval_get(struct team *team, in lb_stats_refresh_interval_get() argument
524 struct lb_priv *lb_priv = get_lb_priv(team); in lb_stats_refresh_interval_get()
529 static int lb_stats_refresh_interval_set(struct team *team, in lb_stats_refresh_interval_set() argument
532 struct lb_priv *lb_priv = get_lb_priv(team); in lb_stats_refresh_interval_set()
589 static int lb_init(struct team *team) in lb_init() argument
591 struct lb_priv *lb_priv = get_lb_priv(team); in lb_init()
603 lb_priv->ex->team = team; in lb_init()
620 err = team_options_register(team, lb_options, ARRAY_SIZE(lb_options)); in lb_init()
632 static void lb_exit(struct team *team) in lb_exit() argument
634 struct lb_priv *lb_priv = get_lb_priv(team); in lb_exit()
636 team_options_unregister(team, lb_options, in lb_exit()
638 lb_bpf_func_free(team); in lb_exit()
644 static int lb_port_enter(struct team *team, struct team_port *port) in lb_port_enter() argument
654 static void lb_port_leave(struct team *team, struct team_port *port) in lb_port_leave() argument
661 static void lb_port_disabled(struct team *team, struct team_port *port) in lb_port_disabled() argument
663 lb_tx_hash_to_port_mapping_null_port(team, port); in lb_port_disabled()
700 MODULE_DESCRIPTION("Load-balancing mode for team");