Lines Matching refs:team
22 typedef struct team_port *lb_select_tx_port_func_t(struct team *,
50 struct team *team; member
67 static struct lb_priv *get_lb_priv(struct team *team) in get_lb_priv() argument
69 return (struct lb_priv *) &team->mode_priv; in get_lb_priv()
88 static void lb_tx_hash_to_port_mapping_null_port(struct team *team, in lb_tx_hash_to_port_mapping_null_port() argument
91 struct lb_priv *lb_priv = get_lb_priv(team); in lb_tx_hash_to_port_mapping_null_port()
106 team_options_change_check(team); in lb_tx_hash_to_port_mapping_null_port()
110 static struct team_port *lb_hash_select_tx_port(struct team *team, in lb_hash_select_tx_port() argument
115 int port_index = team_num_to_port_index(team, hash); in lb_hash_select_tx_port()
117 return team_get_port_by_index_rcu(team, port_index); in lb_hash_select_tx_port()
121 static struct team_port *lb_htpm_select_tx_port(struct team *team, in lb_htpm_select_tx_port() argument
206 static bool lb_transmit(struct team *team, struct sk_buff *skb) in lb_transmit() argument
208 struct lb_priv *lb_priv = get_lb_priv(team); in lb_transmit()
216 port = select_tx_port_func(team, lb_priv, skb, hash); in lb_transmit()
219 if (team_dev_queue_xmit(team, port, skb)) in lb_transmit()
229 static int lb_bpf_func_get(struct team *team, struct team_gsetter_ctx *ctx) in lb_bpf_func_get() argument
231 struct lb_priv *lb_priv = get_lb_priv(team); in lb_bpf_func_get()
271 static int lb_bpf_func_set(struct team *team, struct team_gsetter_ctx *ctx) in lb_bpf_func_set() argument
273 struct lb_priv *lb_priv = get_lb_priv(team); in lb_bpf_func_set()
295 lockdep_is_held(&team->lock)); in lb_bpf_func_set()
308 static int lb_tx_method_get(struct team *team, struct team_gsetter_ctx *ctx) in lb_tx_method_get() argument
310 struct lb_priv *lb_priv = get_lb_priv(team); in lb_tx_method_get()
315 lockdep_is_held(&team->lock)); in lb_tx_method_get()
322 static int lb_tx_method_set(struct team *team, struct team_gsetter_ctx *ctx) in lb_tx_method_set() argument
324 struct lb_priv *lb_priv = get_lb_priv(team); in lb_tx_method_set()
334 static int lb_tx_hash_to_port_mapping_init(struct team *team, in lb_tx_hash_to_port_mapping_init() argument
337 struct lb_priv *lb_priv = get_lb_priv(team); in lb_tx_hash_to_port_mapping_init()
344 static int lb_tx_hash_to_port_mapping_get(struct team *team, in lb_tx_hash_to_port_mapping_get() argument
347 struct lb_priv *lb_priv = get_lb_priv(team); in lb_tx_hash_to_port_mapping_get()
356 static int lb_tx_hash_to_port_mapping_set(struct team *team, in lb_tx_hash_to_port_mapping_set() argument
359 struct lb_priv *lb_priv = get_lb_priv(team); in lb_tx_hash_to_port_mapping_set()
363 list_for_each_entry(port, &team->port_list, list) { in lb_tx_hash_to_port_mapping_set()
374 static int lb_hash_stats_init(struct team *team, in lb_hash_stats_init() argument
377 struct lb_priv *lb_priv = get_lb_priv(team); in lb_hash_stats_init()
384 static int lb_hash_stats_get(struct team *team, struct team_gsetter_ctx *ctx) in lb_hash_stats_get() argument
386 struct lb_priv *lb_priv = get_lb_priv(team); in lb_hash_stats_get()
394 static int lb_port_stats_init(struct team *team, in lb_port_stats_init() argument
404 static int lb_port_stats_get(struct team *team, struct team_gsetter_ctx *ctx) in lb_port_stats_get() argument
421 struct team *team) in __lb_stats_info_refresh_check() argument
447 struct team *team; in lb_stats_refresh() local
461 team = lb_priv_ex->team; in lb_stats_refresh()
462 lb_priv = get_lb_priv(team); in lb_stats_refresh()
464 if (!mutex_trylock(&team->lock)) { in lb_stats_refresh()
478 changed |= __lb_stats_info_refresh_check(s_info, team); in lb_stats_refresh()
481 list_for_each_entry(port, &team->port_list, list) { in lb_stats_refresh()
492 changed |= __lb_stats_info_refresh_check(s_info, team); in lb_stats_refresh()
496 team_options_change_check(team); in lb_stats_refresh()
501 mutex_unlock(&team->lock); in lb_stats_refresh()
504 static int lb_stats_refresh_interval_get(struct team *team, in lb_stats_refresh_interval_get() argument
507 struct lb_priv *lb_priv = get_lb_priv(team); in lb_stats_refresh_interval_get()
513 static int lb_stats_refresh_interval_set(struct team *team, in lb_stats_refresh_interval_set() argument
516 struct lb_priv *lb_priv = get_lb_priv(team); in lb_stats_refresh_interval_set()
573 static int lb_init(struct team *team) in lb_init() argument
575 struct lb_priv *lb_priv = get_lb_priv(team); in lb_init()
587 lb_priv->ex->team = team; in lb_init()
604 err = team_options_register(team, lb_options, ARRAY_SIZE(lb_options)); in lb_init()
616 static void lb_exit(struct team *team) in lb_exit() argument
618 struct lb_priv *lb_priv = get_lb_priv(team); in lb_exit()
620 team_options_unregister(team, lb_options, in lb_exit()
627 static int lb_port_enter(struct team *team, struct team_port *port) in lb_port_enter() argument
637 static void lb_port_leave(struct team *team, struct team_port *port) in lb_port_leave() argument
644 static void lb_port_disabled(struct team *team, struct team_port *port) in lb_port_disabled() argument
646 lb_tx_hash_to_port_mapping_null_port(team, port); in lb_port_disabled()