Lines Matching full:bb
98 struct tipc_bc_base *bb = tipc_bc_base(net); in tipc_bcbase_calc_bc_threshold() local
101 bb->bc_threshold = 1 + (cluster_size * bb->rc_ratio / 100); in tipc_bcbase_calc_bc_threshold()
109 struct tipc_bc_base *bb = tipc_bc_base(net); in tipc_bcbase_select_primary() local
110 int all_dests = tipc_link_bc_peers(bb->link); in tipc_bcbase_select_primary()
111 int max_win = tipc_link_max_win(bb->link); in tipc_bcbase_select_primary()
112 int min_win = tipc_link_min_win(bb->link); in tipc_bcbase_select_primary()
115 bb->primary_bearer = INVALID_BEARER_ID; in tipc_bcbase_select_primary()
116 bb->bcast_support = true; in tipc_bcbase_select_primary()
122 if (!bb->dests[i]) in tipc_bcbase_select_primary()
126 if (mtu < tipc_link_mtu(bb->link)) { in tipc_bcbase_select_primary()
127 tipc_link_set_mtu(bb->link, mtu); in tipc_bcbase_select_primary()
128 tipc_link_set_queue_limits(bb->link, in tipc_bcbase_select_primary()
132 bb->bcast_support &= tipc_bearer_bcast_support(net, i); in tipc_bcbase_select_primary()
133 if (bb->dests[i] < all_dests) in tipc_bcbase_select_primary()
136 bb->primary_bearer = i; in tipc_bcbase_select_primary()
142 prim = bb->primary_bearer; in tipc_bcbase_select_primary()
144 bb->bcast_support = tipc_bearer_bcast_support(net, prim); in tipc_bcbase_select_primary()
149 struct tipc_bc_base *bb = tipc_bc_base(net); in tipc_bcast_inc_bearer_dst_cnt() local
152 bb->dests[bearer_id]++; in tipc_bcast_inc_bearer_dst_cnt()
159 struct tipc_bc_base *bb = tipc_bc_base(net); in tipc_bcast_dec_bearer_dst_cnt() local
162 bb->dests[bearer_id]--; in tipc_bcast_dec_bearer_dst_cnt()
180 struct tipc_bc_base *bb = tipc_bc_base(net); in tipc_bcbase_xmit() local
188 bearer_id = bb->primary_bearer; in tipc_bcbase_xmit()
197 if (!bb->dests[bearer_id]) in tipc_bcbase_xmit()
215 struct tipc_bc_base *bb = tipc_bc_base(net); in tipc_bcast_select_xmit_method() local
219 if (!bb->bcast_support) { in tipc_bcast_select_xmit_method()
224 if (!bb->rcast_support) { in tipc_bcast_select_xmit_method()
238 if (bb->force_bcast) { in tipc_bcast_select_xmit_method()
243 if (bb->force_rcast) { in tipc_bcast_select_xmit_method()
249 method->rcast = dests <= bb->bc_threshold; in tipc_bcast_select_xmit_method()
601 struct tipc_bc_base *bb = tipc_bc_base(net); in tipc_bc_link_set_broadcast_mode() local
605 if (!bb->bcast_support) in tipc_bc_link_set_broadcast_mode()
608 bb->force_bcast = true; in tipc_bc_link_set_broadcast_mode()
609 bb->force_rcast = false; in tipc_bc_link_set_broadcast_mode()
612 if (!bb->rcast_support) in tipc_bc_link_set_broadcast_mode()
615 bb->force_bcast = false; in tipc_bc_link_set_broadcast_mode()
616 bb->force_rcast = true; in tipc_bc_link_set_broadcast_mode()
619 if (!bb->bcast_support || !bb->rcast_support) in tipc_bc_link_set_broadcast_mode()
622 bb->force_bcast = false; in tipc_bc_link_set_broadcast_mode()
623 bb->force_rcast = false; in tipc_bc_link_set_broadcast_mode()
634 struct tipc_bc_base *bb = tipc_bc_base(net); in tipc_bc_link_set_broadcast_ratio() local
636 if (!bb->bcast_support || !bb->rcast_support) in tipc_bc_link_set_broadcast_ratio()
642 bb->rc_ratio = bc_ratio; in tipc_bc_link_set_broadcast_ratio()
692 struct tipc_bc_base *bb = NULL; in tipc_bcast_init() local
695 bb = kzalloc(sizeof(*bb), GFP_KERNEL); in tipc_bcast_init()
696 if (!bb) in tipc_bcast_init()
698 tn->bcbase = bb; in tipc_bcast_init()
706 &bb->inputq, in tipc_bcast_init()
711 bb->link = l; in tipc_bcast_init()
713 bb->rc_ratio = 10; in tipc_bcast_init()
714 bb->rcast_support = true; in tipc_bcast_init()
717 kfree(bb); in tipc_bcast_init()
763 struct tipc_bc_base *bb = tipc_bc_base(net); in tipc_bcast_get_mode() local
765 if (bb->force_bcast) in tipc_bcast_get_mode()
768 if (bb->force_rcast) in tipc_bcast_get_mode()
771 if (bb->bcast_support && bb->rcast_support) in tipc_bcast_get_mode()
779 struct tipc_bc_base *bb = tipc_bc_base(net); in tipc_bcast_get_broadcast_ratio() local
781 return bb->rc_ratio; in tipc_bcast_get_broadcast_ratio()