/kernel/linux/linux-6.6/net/batman-adv/ |
H A D | gateway_client.c | 59 * batadv_gw_node_release() - release gw_node from lists and queue for free 61 * @ref: kref pointer of the gw_node 65 struct batadv_gw_node *gw_node; in batadv_gw_node_release() local 67 gw_node = container_of(ref, struct batadv_gw_node, refcount); in batadv_gw_node_release() 69 batadv_orig_node_put(gw_node->orig_node); in batadv_gw_node_release() 70 kfree_rcu(gw_node, rcu); in batadv_gw_node_release() 82 struct batadv_gw_node *gw_node; in batadv_gw_get_selected_gw_node() local 85 gw_node = rcu_dereference(bat_priv->gw.curr_gw); in batadv_gw_get_selected_gw_node() 86 if (!gw_node) in batadv_gw_get_selected_gw_node() 89 if (!kref_get_unless_zero(&gw_node in batadv_gw_get_selected_gw_node() 106 struct batadv_gw_node *gw_node; batadv_gw_get_selected_orig() local 329 struct batadv_gw_node *gw_node; batadv_gw_node_add() local 373 struct batadv_gw_node *gw_node_tmp, *gw_node = NULL; batadv_gw_node_get() local 403 struct batadv_gw_node *gw_node, *curr_gw = NULL; batadv_gw_node_update() local 482 struct batadv_gw_node *gw_node; batadv_gw_node_free() local 689 struct batadv_gw_node *gw_node = NULL; batadv_gw_out_of_range() local [all...] |
H A D | bat_v.c | 517 * @gw_node: the GW to retrieve the metric for 524 static int batadv_v_gw_throughput_get(struct batadv_gw_node *gw_node, u32 *bw) in batadv_v_gw_throughput_get() argument 531 orig_node = gw_node->orig_node; in batadv_v_gw_throughput_get() 546 *bw = min_t(u32, *bw, gw_node->bandwidth_down); in batadv_v_gw_throughput_get() 565 struct batadv_gw_node *gw_node, *curr_gw = NULL; in batadv_v_gw_get_best_gw_node() local 569 hlist_for_each_entry_rcu(gw_node, &bat_priv->gw.gateway_list, list) { in batadv_v_gw_get_best_gw_node() 570 if (!kref_get_unless_zero(&gw_node->refcount)) in batadv_v_gw_get_best_gw_node() 573 if (batadv_v_gw_throughput_get(gw_node, &bw) < 0) in batadv_v_gw_get_best_gw_node() 581 curr_gw = gw_node; in batadv_v_gw_get_best_gw_node() 586 batadv_gw_node_put(gw_node); in batadv_v_gw_get_best_gw_node() 657 batadv_v_gw_dump_entry(struct sk_buff *msg, u32 portid, struct netlink_callback *cb, struct batadv_priv *bat_priv, struct batadv_gw_node *gw_node) batadv_v_gw_dump_entry() argument 757 struct batadv_gw_node *gw_node; batadv_v_gw_dump() local [all...] |
H A D | gateway_client.h | 43 * batadv_gw_node_put() - decrement the gw_node refcounter and possibly release 45 * @gw_node: gateway node to free 47 static inline void batadv_gw_node_put(struct batadv_gw_node *gw_node) in batadv_gw_node_put() argument 49 if (!gw_node) in batadv_gw_node_put() 52 kref_put(&gw_node->refcount, batadv_gw_node_release); in batadv_gw_node_put()
|
H A D | bat_iv_ogm.c | 2252 struct batadv_gw_node *gw_node, *curr_gw = NULL; in batadv_iv_gw_get_best_gw_node() local 2260 hlist_for_each_entry_rcu(gw_node, &bat_priv->gw.gateway_list, list) { in batadv_iv_gw_get_best_gw_node() 2261 orig_node = gw_node->orig_node; in batadv_iv_gw_get_best_gw_node() 2271 if (!kref_get_unless_zero(&gw_node->refcount)) in batadv_iv_gw_get_best_gw_node() 2279 tmp_gw_factor *= gw_node->bandwidth_down; in batadv_iv_gw_get_best_gw_node() 2287 curr_gw = gw_node; in batadv_iv_gw_get_best_gw_node() 2301 curr_gw = gw_node; in batadv_iv_gw_get_best_gw_node() 2313 batadv_gw_node_put(gw_node); in batadv_iv_gw_get_best_gw_node() 2395 * @gw_node: Gateway to be dumped 2402 struct batadv_gw_node *gw_node) in batadv_iv_gw_dump_entry() 2399 batadv_iv_gw_dump_entry(struct sk_buff *msg, u32 portid, struct netlink_callback *cb, struct batadv_priv *bat_priv, struct batadv_gw_node *gw_node) batadv_iv_gw_dump_entry() argument 2475 struct batadv_gw_node *gw_node; batadv_iv_gw_dump() local [all...] |
/kernel/linux/linux-5.10/net/batman-adv/ |
H A D | gateway_client.c | 59 * batadv_gw_node_release() - release gw_node from lists and queue for free 61 * @ref: kref pointer of the gw_node 65 struct batadv_gw_node *gw_node; in batadv_gw_node_release() local 67 gw_node = container_of(ref, struct batadv_gw_node, refcount); in batadv_gw_node_release() 69 batadv_orig_node_put(gw_node->orig_node); in batadv_gw_node_release() 70 kfree_rcu(gw_node, rcu); in batadv_gw_node_release() 82 struct batadv_gw_node *gw_node; in batadv_gw_get_selected_gw_node() local 85 gw_node = rcu_dereference(bat_priv->gw.curr_gw); in batadv_gw_get_selected_gw_node() 86 if (!gw_node) in batadv_gw_get_selected_gw_node() 89 if (!kref_get_unless_zero(&gw_node in batadv_gw_get_selected_gw_node() 106 struct batadv_gw_node *gw_node; batadv_gw_get_selected_orig() local 336 struct batadv_gw_node *gw_node; batadv_gw_node_add() local 380 struct batadv_gw_node *gw_node_tmp, *gw_node = NULL; batadv_gw_node_get() local 410 struct batadv_gw_node *gw_node, *curr_gw = NULL; batadv_gw_node_update() local 491 struct batadv_gw_node *gw_node; batadv_gw_node_free() local 738 struct batadv_gw_node *gw_node = NULL; batadv_gw_out_of_range() local [all...] |
H A D | bat_v.c | 697 * @gw_node: the GW to retrieve the metric for 704 static int batadv_v_gw_throughput_get(struct batadv_gw_node *gw_node, u32 *bw) in batadv_v_gw_throughput_get() argument 711 orig_node = gw_node->orig_node; in batadv_v_gw_throughput_get() 726 *bw = min_t(u32, *bw, gw_node->bandwidth_down); in batadv_v_gw_throughput_get() 747 struct batadv_gw_node *gw_node, *curr_gw = NULL; in batadv_v_gw_get_best_gw_node() local 751 hlist_for_each_entry_rcu(gw_node, &bat_priv->gw.gateway_list, list) { in batadv_v_gw_get_best_gw_node() 752 if (!kref_get_unless_zero(&gw_node->refcount)) in batadv_v_gw_get_best_gw_node() 755 if (batadv_v_gw_throughput_get(gw_node, &bw) < 0) in batadv_v_gw_get_best_gw_node() 764 curr_gw = gw_node; in batadv_v_gw_get_best_gw_node() 769 batadv_gw_node_put(gw_node); in batadv_v_gw_get_best_gw_node() 834 batadv_v_gw_write_buffer_text(struct batadv_priv *bat_priv, struct seq_file *seq, const struct batadv_gw_node *gw_node) batadv_v_gw_write_buffer_text() argument 883 struct batadv_gw_node *gw_node; batadv_v_gw_print() local 914 batadv_v_gw_dump_entry(struct sk_buff *msg, u32 portid, struct netlink_callback *cb, struct batadv_priv *bat_priv, struct batadv_gw_node *gw_node) batadv_v_gw_dump_entry() argument 1011 struct batadv_gw_node *gw_node; batadv_v_gw_dump() local [all...] |
H A D | gateway_client.h | 45 * batadv_gw_node_put() - decrement the gw_node refcounter and possibly release 47 * @gw_node: gateway node to free 49 static inline void batadv_gw_node_put(struct batadv_gw_node *gw_node) in batadv_gw_node_put() argument 51 if (!gw_node) in batadv_gw_node_put() 54 kref_put(&gw_node->refcount, batadv_gw_node_release); in batadv_gw_node_put()
|
H A D | bat_iv_ogm.c | 2418 struct batadv_gw_node *gw_node, *curr_gw = NULL; in batadv_iv_gw_get_best_gw_node() local 2426 hlist_for_each_entry_rcu(gw_node, &bat_priv->gw.gateway_list, list) { in batadv_iv_gw_get_best_gw_node() 2427 orig_node = gw_node->orig_node; in batadv_iv_gw_get_best_gw_node() 2437 if (!kref_get_unless_zero(&gw_node->refcount)) in batadv_iv_gw_get_best_gw_node() 2445 tmp_gw_factor *= gw_node->bandwidth_down; in batadv_iv_gw_get_best_gw_node() 2454 curr_gw = gw_node; in batadv_iv_gw_get_best_gw_node() 2469 curr_gw = gw_node; in batadv_iv_gw_get_best_gw_node() 2481 batadv_gw_node_put(gw_node); in batadv_iv_gw_get_best_gw_node() 2566 const struct batadv_gw_node *gw_node) in batadv_iv_gw_write_buffer_text() 2573 router = batadv_orig_router_get(gw_node in batadv_iv_gw_write_buffer_text() 2564 batadv_iv_gw_write_buffer_text(struct batadv_priv *bat_priv, struct seq_file *seq, const struct batadv_gw_node *gw_node) batadv_iv_gw_write_buffer_text() argument 2607 struct batadv_gw_node *gw_node; batadv_iv_gw_print() local 2638 batadv_iv_gw_dump_entry(struct sk_buff *msg, u32 portid, struct netlink_callback *cb, struct batadv_priv *bat_priv, struct batadv_gw_node *gw_node) batadv_iv_gw_dump_entry() argument 2715 struct batadv_gw_node *gw_node; batadv_iv_gw_dump() local [all...] |