Lines Matching refs:bond

58 	struct bonding *bond;  in bonding_show_bonds()  local
62 list_for_each_entry(bond, &bn->dev_list, bond_list) { in bonding_show_bonds()
70 res += sprintf(buf + res, "%s ", bond->dev->name); in bonding_show_bonds()
81 struct bonding *bond; in bond_get_by_name() local
83 list_for_each_entry(bond, &bn->dev_list, bond_list) { in bond_get_by_name()
84 if (strncmp(bond->dev->name, ifname, IFNAMSIZ) == 0) in bond_get_by_name()
85 return bond->dev; in bond_get_by_name()
162 struct bonding *bond = to_bond(d); in bonding_sysfs_store_option() local
169 ret = bond_opt_tryset_rtnl(bond, opt->id, (char *)buffer); in bonding_sysfs_store_option()
180 struct bonding *bond = to_bond(d); in bonding_show_slaves() local
188 bond_for_each_slave(bond, slave, iter) { in bonding_show_slaves()
213 struct bonding *bond = to_bond(d); in bonding_show_mode() local
216 val = bond_opt_get_val(BOND_OPT_MODE, BOND_MODE(bond)); in bonding_show_mode()
218 return sprintf(buf, "%s %d\n", val->string, BOND_MODE(bond)); in bonding_show_mode()
228 struct bonding *bond = to_bond(d); in bonding_show_xmit_hash() local
231 val = bond_opt_get_val(BOND_OPT_XMIT_HASH, bond->params.xmit_policy); in bonding_show_xmit_hash()
233 return sprintf(buf, "%s %d\n", val->string, bond->params.xmit_policy); in bonding_show_xmit_hash()
243 struct bonding *bond = to_bond(d); in bonding_show_arp_validate() local
247 bond->params.arp_validate); in bonding_show_arp_validate()
249 return sprintf(buf, "%s %d\n", val->string, bond->params.arp_validate); in bonding_show_arp_validate()
259 struct bonding *bond = to_bond(d); in bonding_show_arp_all_targets() local
263 bond->params.arp_all_targets); in bonding_show_arp_all_targets()
265 val->string, bond->params.arp_all_targets); in bonding_show_arp_all_targets()
275 struct bonding *bond = to_bond(d); in bonding_show_fail_over_mac() local
279 bond->params.fail_over_mac); in bonding_show_fail_over_mac()
281 return sprintf(buf, "%s %d\n", val->string, bond->params.fail_over_mac); in bonding_show_fail_over_mac()
291 struct bonding *bond = to_bond(d); in bonding_show_arp_interval() local
293 return sprintf(buf, "%d\n", bond->params.arp_interval); in bonding_show_arp_interval()
303 struct bonding *bond = to_bond(d); in bonding_show_arp_targets() local
307 if (bond->params.arp_targets[i]) in bonding_show_arp_targets()
309 &bond->params.arp_targets[i]); in bonding_show_arp_targets()
324 struct bonding *bond = to_bond(d); in bonding_show_downdelay() local
326 return sprintf(buf, "%d\n", bond->params.downdelay * bond->params.miimon); in bonding_show_downdelay()
335 struct bonding *bond = to_bond(d); in bonding_show_updelay() local
337 return sprintf(buf, "%d\n", bond->params.updelay * bond->params.miimon); in bonding_show_updelay()
348 struct bonding *bond = to_bond(d); in bonding_show_lacp() local
351 val = bond_opt_get_val(BOND_OPT_LACP_RATE, bond->params.lacp_fast); in bonding_show_lacp()
353 return sprintf(buf, "%s %d\n", val->string, bond->params.lacp_fast); in bonding_show_lacp()
362 struct bonding *bond = to_bond(d); in bonding_show_min_links() local
364 return sprintf(buf, "%u\n", bond->params.min_links); in bonding_show_min_links()
373 struct bonding *bond = to_bond(d); in bonding_show_ad_select() local
376 val = bond_opt_get_val(BOND_OPT_AD_SELECT, bond->params.ad_select); in bonding_show_ad_select()
378 return sprintf(buf, "%s %d\n", val->string, bond->params.ad_select); in bonding_show_ad_select()
388 struct bonding *bond = to_bond(d); in bonding_show_num_peer_notif() local
389 return sprintf(buf, "%d\n", bond->params.num_peer_notif); in bonding_show_num_peer_notif()
401 struct bonding *bond = to_bond(d); in bonding_show_miimon() local
403 return sprintf(buf, "%d\n", bond->params.miimon); in bonding_show_miimon()
413 struct bonding *bond = to_bond(d); in bonding_show_primary() local
418 primary = rcu_dereference(bond->primary_slave); in bonding_show_primary()
433 struct bonding *bond = to_bond(d); in bonding_show_primary_reselect() local
437 bond->params.primary_reselect); in bonding_show_primary_reselect()
440 val->string, bond->params.primary_reselect); in bonding_show_primary_reselect()
450 struct bonding *bond = to_bond(d); in bonding_show_carrier() local
452 return sprintf(buf, "%d\n", bond->params.use_carrier); in bonding_show_carrier()
463 struct bonding *bond = to_bond(d); in bonding_show_active_slave() local
468 slave_dev = bond_option_active_slave_get_rcu(bond); in bonding_show_active_slave()
483 struct bonding *bond = to_bond(d); in bonding_show_mii_status() local
484 bool active = !!rcu_access_pointer(bond->curr_active_slave); in bonding_show_mii_status()
496 struct bonding *bond = to_bond(d); in bonding_show_ad_aggregator() local
498 if (BOND_MODE(bond) == BOND_MODE_8023AD) { in bonding_show_ad_aggregator()
501 bond_3ad_get_active_agg_info(bond, &ad_info) in bonding_show_ad_aggregator()
516 struct bonding *bond = to_bond(d); in bonding_show_ad_num_ports() local
518 if (BOND_MODE(bond) == BOND_MODE_8023AD) { in bonding_show_ad_num_ports()
521 bond_3ad_get_active_agg_info(bond, &ad_info) in bonding_show_ad_num_ports()
536 struct bonding *bond = to_bond(d); in bonding_show_ad_actor_key() local
538 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) { in bonding_show_ad_actor_key()
541 bond_3ad_get_active_agg_info(bond, &ad_info) in bonding_show_ad_actor_key()
556 struct bonding *bond = to_bond(d); in bonding_show_ad_partner_key() local
558 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) { in bonding_show_ad_partner_key()
561 bond_3ad_get_active_agg_info(bond, &ad_info) in bonding_show_ad_partner_key()
576 struct bonding *bond = to_bond(d); in bonding_show_ad_partner_mac() local
578 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) { in bonding_show_ad_partner_mac()
580 if (!bond_3ad_get_active_agg_info(bond, &ad_info)) in bonding_show_ad_partner_mac()
593 struct bonding *bond = to_bond(d); in bonding_show_queue_id() local
601 bond_for_each_slave(bond, slave, iter) { in bonding_show_queue_id()
628 struct bonding *bond = to_bond(d); in bonding_show_slaves_active() local
630 return sprintf(buf, "%d\n", bond->params.all_slaves_active); in bonding_show_slaves_active()
640 struct bonding *bond = to_bond(d); in bonding_show_resend_igmp() local
642 return sprintf(buf, "%d\n", bond->params.resend_igmp); in bonding_show_resend_igmp()
652 struct bonding *bond = to_bond(d); in bonding_show_lp_interval() local
654 return sprintf(buf, "%d\n", bond->params.lp_interval); in bonding_show_lp_interval()
663 struct bonding *bond = to_bond(d); in bonding_show_tlb_dynamic_lb() local
664 return sprintf(buf, "%d\n", bond->params.tlb_dynamic_lb); in bonding_show_tlb_dynamic_lb()
673 struct bonding *bond = to_bond(d); in bonding_show_packets_per_slave() local
674 unsigned int packets_per_slave = bond->params.packets_per_slave; in bonding_show_packets_per_slave()
685 struct bonding *bond = to_bond(d); in bonding_show_ad_actor_sys_prio() local
687 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) in bonding_show_ad_actor_sys_prio()
688 return sprintf(buf, "%hu\n", bond->params.ad_actor_sys_prio); in bonding_show_ad_actor_sys_prio()
699 struct bonding *bond = to_bond(d); in bonding_show_ad_actor_system() local
701 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) in bonding_show_ad_actor_system()
702 return sprintf(buf, "%pM\n", bond->params.ad_actor_system); in bonding_show_ad_actor_system()
714 struct bonding *bond = to_bond(d); in bonding_show_ad_user_port_key() local
716 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) in bonding_show_ad_user_port_key()
717 return sprintf(buf, "%hu\n", bond->params.ad_user_port_key); in bonding_show_ad_user_port_key()
812 void bond_prepare_sysfs_group(struct bonding *bond) in bond_prepare_sysfs_group() argument
814 bond->dev->sysfs_groups[0] = &bonding_group; in bond_prepare_sysfs_group()