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()
396 struct bonding *bond = to_bond(d); in bonding_store_num_peer_notif() local
399 ret = bond_opt_tryset_rtnl(bond, BOND_OPT_NUM_PEER_NOTIF, (char *)buf); in bonding_store_num_peer_notif()
415 struct bonding *bond = to_bond(d); in bonding_show_miimon() local
417 return sprintf(buf, "%d\n", bond->params.miimon); in bonding_show_miimon()
427 struct bonding *bond = to_bond(d); in bonding_show_primary() local
432 primary = rcu_dereference(bond->primary_slave); in bonding_show_primary()
447 struct bonding *bond = to_bond(d); in bonding_show_primary_reselect() local
451 bond->params.primary_reselect); in bonding_show_primary_reselect()
454 val->string, bond->params.primary_reselect); in bonding_show_primary_reselect()
464 struct bonding *bond = to_bond(d); in bonding_show_carrier() local
466 return sprintf(buf, "%d\n", bond->params.use_carrier); in bonding_show_carrier()
477 struct bonding *bond = to_bond(d); in bonding_show_active_slave() local
482 slave_dev = bond_option_active_slave_get_rcu(bond); in bonding_show_active_slave()
497 struct bonding *bond = to_bond(d); in bonding_show_mii_status() local
498 bool active = !!rcu_access_pointer(bond->curr_active_slave); in bonding_show_mii_status()
510 struct bonding *bond = to_bond(d); in bonding_show_ad_aggregator() local
512 if (BOND_MODE(bond) == BOND_MODE_8023AD) { in bonding_show_ad_aggregator()
515 bond_3ad_get_active_agg_info(bond, &ad_info) in bonding_show_ad_aggregator()
530 struct bonding *bond = to_bond(d); in bonding_show_ad_num_ports() local
532 if (BOND_MODE(bond) == BOND_MODE_8023AD) { in bonding_show_ad_num_ports()
535 bond_3ad_get_active_agg_info(bond, &ad_info) in bonding_show_ad_num_ports()
550 struct bonding *bond = to_bond(d); in bonding_show_ad_actor_key() local
552 if (BOND_MODE(bond) == BOND_MODE_8023AD) { in bonding_show_ad_actor_key()
555 bond_3ad_get_active_agg_info(bond, &ad_info) in bonding_show_ad_actor_key()
570 struct bonding *bond = to_bond(d); in bonding_show_ad_partner_key() local
572 if (BOND_MODE(bond) == BOND_MODE_8023AD) { in bonding_show_ad_partner_key()
575 bond_3ad_get_active_agg_info(bond, &ad_info) in bonding_show_ad_partner_key()
590 struct bonding *bond = to_bond(d); in bonding_show_ad_partner_mac() local
592 if (BOND_MODE(bond) == BOND_MODE_8023AD) { in bonding_show_ad_partner_mac()
594 if (!bond_3ad_get_active_agg_info(bond, &ad_info)) in bonding_show_ad_partner_mac()
607 struct bonding *bond = to_bond(d); in bonding_show_queue_id() local
615 bond_for_each_slave(bond, slave, iter) { in bonding_show_queue_id()
642 struct bonding *bond = to_bond(d); in bonding_show_slaves_active() local
644 return sprintf(buf, "%d\n", bond->params.all_slaves_active); in bonding_show_slaves_active()
654 struct bonding *bond = to_bond(d); in bonding_show_resend_igmp() local
656 return sprintf(buf, "%d\n", bond->params.resend_igmp); in bonding_show_resend_igmp()
666 struct bonding *bond = to_bond(d); in bonding_show_lp_interval() local
668 return sprintf(buf, "%d\n", bond->params.lp_interval); in bonding_show_lp_interval()
677 struct bonding *bond = to_bond(d); in bonding_show_tlb_dynamic_lb() local
678 return sprintf(buf, "%d\n", bond->params.tlb_dynamic_lb); in bonding_show_tlb_dynamic_lb()
687 struct bonding *bond = to_bond(d); in bonding_show_packets_per_slave() local
688 unsigned int packets_per_slave = bond->params.packets_per_slave; in bonding_show_packets_per_slave()
780 void bond_prepare_sysfs_group(struct bonding *bond) in bond_prepare_sysfs_group() argument
782 bond->dev->sysfs_groups[0] = &bonding_group; in bond_prepare_sysfs_group()