Lines Matching defs: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,
32 typedef struct team_port *lb_select_tx_port_func_t(struct team *,
60 struct team *team;
77 static struct lb_priv *get_lb_priv(struct team *team)
79 return (struct lb_priv *) &team->mode_priv;
98 static void lb_tx_hash_to_port_mapping_null_port(struct team *team,
101 struct lb_priv *lb_priv = get_lb_priv(team);
116 team_options_change_check(team);
120 static struct team_port *lb_hash_select_tx_port(struct team *team,
125 int port_index = team_num_to_port_index(team, hash);
127 return team_get_port_by_index_rcu(team, port_index);
131 static struct team_port *lb_htpm_select_tx_port(struct team *team,
142 return lb_hash_select_tx_port(team, lb_priv, skb, hash);
222 static bool lb_transmit(struct team *team, struct sk_buff *skb)
224 struct lb_priv *lb_priv = get_lb_priv(team);
232 port = select_tx_port_func(team, lb_priv, skb, hash);
235 if (team_dev_queue_xmit(team, port, skb))
245 static int lb_bpf_func_get(struct team *team, struct team_gsetter_ctx *ctx)
247 struct lb_priv *lb_priv = get_lb_priv(team);
287 static int lb_bpf_func_set(struct team *team, struct team_gsetter_ctx *ctx)
289 struct lb_priv *lb_priv = get_lb_priv(team);
311 lockdep_is_held(&team->lock));
324 static void lb_bpf_func_free(struct team *team)
326 struct lb_priv *lb_priv = get_lb_priv(team);
334 lockdep_is_held(&team->lock));
338 static int lb_tx_method_get(struct team *team, struct team_gsetter_ctx *ctx)
340 struct lb_priv *lb_priv = get_lb_priv(team);
345 lockdep_is_held(&team->lock));
352 static int lb_tx_method_set(struct team *team, struct team_gsetter_ctx *ctx)
354 struct lb_priv *lb_priv = get_lb_priv(team);
364 static int lb_tx_hash_to_port_mapping_init(struct team *team,
367 struct lb_priv *lb_priv = get_lb_priv(team);
374 static int lb_tx_hash_to_port_mapping_get(struct team *team,
377 struct lb_priv *lb_priv = get_lb_priv(team);
386 static int lb_tx_hash_to_port_mapping_set(struct team *team,
389 struct lb_priv *lb_priv = get_lb_priv(team);
393 list_for_each_entry(port, &team->port_list, list) {
404 static int lb_hash_stats_init(struct team *team,
407 struct lb_priv *lb_priv = get_lb_priv(team);
414 static int lb_hash_stats_get(struct team *team, struct team_gsetter_ctx *ctx)
416 struct lb_priv *lb_priv = get_lb_priv(team);
424 static int lb_port_stats_init(struct team *team,
434 static int lb_port_stats_get(struct team *team, struct team_gsetter_ctx *ctx)
451 struct team *team)
477 struct team *team;
491 team = lb_priv_ex->team;
492 lb_priv = get_lb_priv(team);
494 if (!mutex_trylock(&team->lock)) {
508 changed |= __lb_stats_info_refresh_check(s_info, team);
511 list_for_each_entry(port, &team->port_list, list) {
522 changed |= __lb_stats_info_refresh_check(s_info, team);
526 team_options_change_check(team);
531 mutex_unlock(&team->lock);
534 static int lb_stats_refresh_interval_get(struct team *team,
537 struct lb_priv *lb_priv = get_lb_priv(team);
543 static int lb_stats_refresh_interval_set(struct team *team,
546 struct lb_priv *lb_priv = get_lb_priv(team);
603 static int lb_init(struct team *team)
605 struct lb_priv *lb_priv = get_lb_priv(team);
617 lb_priv->ex->team = team;
634 err = team_options_register(team, lb_options, ARRAY_SIZE(lb_options));
646 static void lb_exit(struct team *team)
648 struct lb_priv *lb_priv = get_lb_priv(team);
650 team_options_unregister(team, lb_options,
652 lb_bpf_func_free(team);
658 static int lb_port_enter(struct team *team, struct team_port *port)
668 static void lb_port_leave(struct team *team, struct team_port *port)
675 static void lb_port_disabled(struct team *team, struct team_port *port)
677 lb_tx_hash_to_port_mapping_null_port(team, port);
714 MODULE_DESCRIPTION("Load-balancing mode for team");