Lines Matching refs:bond

41 	struct bonding *bond;  in bonding_show_bonds()  local
45 list_for_each_entry(bond, &bn->dev_list, bond_list) { in bonding_show_bonds()
53 res += sprintf(buf + res, "%s ", bond->dev->name); in bonding_show_bonds()
64 struct bonding *bond; in bond_get_by_name() local
66 list_for_each_entry(bond, &bn->dev_list, bond_list) { in bond_get_by_name()
67 if (strncmp(bond->dev->name, ifname, IFNAMSIZ) == 0) in bond_get_by_name()
68 return bond->dev; in bond_get_by_name()
145 struct bonding *bond = to_bond(d); in bonding_sysfs_store_option() local
156 ret = bond_opt_tryset_rtnl(bond, opt->id, buffer_clone); in bonding_sysfs_store_option()
168 struct bonding *bond = to_bond(d); in bonding_show_slaves() local
176 bond_for_each_slave(bond, slave, iter) { in bonding_show_slaves()
201 struct bonding *bond = to_bond(d); in bonding_show_mode() local
204 val = bond_opt_get_val(BOND_OPT_MODE, BOND_MODE(bond)); in bonding_show_mode()
206 return sprintf(buf, "%s %d\n", val->string, BOND_MODE(bond)); in bonding_show_mode()
215 struct bonding *bond = to_bond(d); in bonding_show_xmit_hash() local
218 val = bond_opt_get_val(BOND_OPT_XMIT_HASH, bond->params.xmit_policy); in bonding_show_xmit_hash()
220 return sprintf(buf, "%s %d\n", val->string, bond->params.xmit_policy); in bonding_show_xmit_hash()
230 struct bonding *bond = to_bond(d); in bonding_show_arp_validate() local
234 bond->params.arp_validate); in bonding_show_arp_validate()
236 return sprintf(buf, "%s %d\n", val->string, bond->params.arp_validate); in bonding_show_arp_validate()
246 struct bonding *bond = to_bond(d); in bonding_show_arp_all_targets() local
250 bond->params.arp_all_targets); in bonding_show_arp_all_targets()
252 val->string, bond->params.arp_all_targets); in bonding_show_arp_all_targets()
262 struct bonding *bond = to_bond(d); in bonding_show_fail_over_mac() local
266 bond->params.fail_over_mac); in bonding_show_fail_over_mac()
268 return sprintf(buf, "%s %d\n", val->string, bond->params.fail_over_mac); in bonding_show_fail_over_mac()
278 struct bonding *bond = to_bond(d); in bonding_show_arp_interval() local
280 return sprintf(buf, "%d\n", bond->params.arp_interval); in bonding_show_arp_interval()
290 struct bonding *bond = to_bond(d); in bonding_show_arp_targets() local
294 if (bond->params.arp_targets[i]) in bonding_show_arp_targets()
296 &bond->params.arp_targets[i]); in bonding_show_arp_targets()
311 struct bonding *bond = to_bond(d); in bonding_show_downdelay() local
313 return sprintf(buf, "%d\n", bond->params.downdelay * bond->params.miimon); in bonding_show_downdelay()
322 struct bonding *bond = to_bond(d); in bonding_show_updelay() local
324 return sprintf(buf, "%d\n", bond->params.updelay * bond->params.miimon); in bonding_show_updelay()
334 struct bonding *bond = to_bond(d); in bonding_show_peer_notif_delay() local
337 bond->params.peer_notif_delay * bond->params.miimon); in bonding_show_peer_notif_delay()
347 struct bonding *bond = to_bond(d); in bonding_show_lacp_active() local
350 val = bond_opt_get_val(BOND_OPT_LACP_ACTIVE, bond->params.lacp_active); in bonding_show_lacp_active()
352 return sprintf(buf, "%s %d\n", val->string, bond->params.lacp_active); in bonding_show_lacp_active()
361 struct bonding *bond = to_bond(d); in bonding_show_lacp_rate() local
364 val = bond_opt_get_val(BOND_OPT_LACP_RATE, bond->params.lacp_fast); in bonding_show_lacp_rate()
366 return sprintf(buf, "%s %d\n", val->string, bond->params.lacp_fast); in bonding_show_lacp_rate()
375 struct bonding *bond = to_bond(d); in bonding_show_min_links() local
377 return sprintf(buf, "%u\n", bond->params.min_links); in bonding_show_min_links()
386 struct bonding *bond = to_bond(d); in bonding_show_ad_select() local
389 val = bond_opt_get_val(BOND_OPT_AD_SELECT, bond->params.ad_select); in bonding_show_ad_select()
391 return sprintf(buf, "%s %d\n", val->string, bond->params.ad_select); in bonding_show_ad_select()
401 struct bonding *bond = to_bond(d); in bonding_show_num_peer_notif() local
403 return sprintf(buf, "%d\n", bond->params.num_peer_notif); in bonding_show_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 = netif_carrier_ok(bond->dev); 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()
516 bond_3ad_get_active_agg_info(bond, &ad_info) in bonding_show_ad_aggregator()
531 struct bonding *bond = to_bond(d); in bonding_show_ad_num_ports() local
533 if (BOND_MODE(bond) == BOND_MODE_8023AD) { in bonding_show_ad_num_ports()
537 bond_3ad_get_active_agg_info(bond, &ad_info) in bonding_show_ad_num_ports()
552 struct bonding *bond = to_bond(d); in bonding_show_ad_actor_key() local
554 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) { in bonding_show_ad_actor_key()
558 bond_3ad_get_active_agg_info(bond, &ad_info) in bonding_show_ad_actor_key()
573 struct bonding *bond = to_bond(d); in bonding_show_ad_partner_key() local
575 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) { in bonding_show_ad_partner_key()
579 bond_3ad_get_active_agg_info(bond, &ad_info) in bonding_show_ad_partner_key()
594 struct bonding *bond = to_bond(d); in bonding_show_ad_partner_mac() local
596 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) { in bonding_show_ad_partner_mac()
599 if (!bond_3ad_get_active_agg_info(bond, &ad_info)) in bonding_show_ad_partner_mac()
612 struct bonding *bond = to_bond(d); in bonding_show_queue_id() local
620 bond_for_each_slave(bond, slave, iter) { in bonding_show_queue_id()
647 struct bonding *bond = to_bond(d); in bonding_show_slaves_active() local
649 return sprintf(buf, "%d\n", bond->params.all_slaves_active); in bonding_show_slaves_active()
659 struct bonding *bond = to_bond(d); in bonding_show_resend_igmp() local
661 return sprintf(buf, "%d\n", bond->params.resend_igmp); in bonding_show_resend_igmp()
671 struct bonding *bond = to_bond(d); in bonding_show_lp_interval() local
673 return sprintf(buf, "%d\n", bond->params.lp_interval); in bonding_show_lp_interval()
682 struct bonding *bond = to_bond(d); in bonding_show_tlb_dynamic_lb() local
684 return sprintf(buf, "%d\n", bond->params.tlb_dynamic_lb); in bonding_show_tlb_dynamic_lb()
693 struct bonding *bond = to_bond(d); in bonding_show_packets_per_slave() local
694 unsigned int packets_per_slave = bond->params.packets_per_slave; in bonding_show_packets_per_slave()
705 struct bonding *bond = to_bond(d); in bonding_show_ad_actor_sys_prio() local
707 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) in bonding_show_ad_actor_sys_prio()
708 return sprintf(buf, "%hu\n", bond->params.ad_actor_sys_prio); in bonding_show_ad_actor_sys_prio()
719 struct bonding *bond = to_bond(d); in bonding_show_ad_actor_system() local
721 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) in bonding_show_ad_actor_system()
722 return sprintf(buf, "%pM\n", bond->params.ad_actor_system); in bonding_show_ad_actor_system()
734 struct bonding *bond = to_bond(d); in bonding_show_ad_user_port_key() local
736 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) in bonding_show_ad_user_port_key()
737 return sprintf(buf, "%hu\n", bond->params.ad_user_port_key); in bonding_show_ad_user_port_key()
834 void bond_prepare_sysfs_group(struct bonding *bond) in bond_prepare_sysfs_group() argument
836 bond->dev->sysfs_groups[0] = &bonding_group; in bond_prepare_sysfs_group()