Lines Matching full: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 += sysfs_emit_at(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()
164 /* Show the slaves in the current bond. */
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 sysfs_emit(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 sysfs_emit(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 sysfs_emit(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 sysfs_emit(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 sysfs_emit(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_missed_max() local
313 return sysfs_emit(buf, "%u\n", bond->params.missed_max); in bonding_show_missed_max()
323 struct bonding *bond = to_bond(d); in bonding_show_downdelay() local
325 return sysfs_emit(buf, "%d\n", bond->params.downdelay * bond->params.miimon); in bonding_show_downdelay()
334 struct bonding *bond = to_bond(d); in bonding_show_updelay() local
336 return sysfs_emit(buf, "%d\n", bond->params.updelay * bond->params.miimon); in bonding_show_updelay()
346 struct bonding *bond = to_bond(d); in bonding_show_peer_notif_delay() local
349 bond->params.peer_notif_delay * bond->params.miimon); in bonding_show_peer_notif_delay()
359 struct bonding *bond = to_bond(d); in bonding_show_lacp_active() local
362 val = bond_opt_get_val(BOND_OPT_LACP_ACTIVE, bond->params.lacp_active); in bonding_show_lacp_active()
364 return sysfs_emit(buf, "%s %d\n", val->string, bond->params.lacp_active); in bonding_show_lacp_active()
373 struct bonding *bond = to_bond(d); in bonding_show_lacp_rate() local
376 val = bond_opt_get_val(BOND_OPT_LACP_RATE, bond->params.lacp_fast); in bonding_show_lacp_rate()
378 return sysfs_emit(buf, "%s %d\n", val->string, bond->params.lacp_fast); in bonding_show_lacp_rate()
387 struct bonding *bond = to_bond(d); in bonding_show_min_links() local
389 return sysfs_emit(buf, "%u\n", bond->params.min_links); in bonding_show_min_links()
398 struct bonding *bond = to_bond(d); in bonding_show_ad_select() local
401 val = bond_opt_get_val(BOND_OPT_AD_SELECT, bond->params.ad_select); in bonding_show_ad_select()
403 return sysfs_emit(buf, "%s %d\n", val->string, bond->params.ad_select); in bonding_show_ad_select()
413 struct bonding *bond = to_bond(d); in bonding_show_num_peer_notif() local
415 return sysfs_emit(buf, "%d\n", bond->params.num_peer_notif); in bonding_show_num_peer_notif()
427 struct bonding *bond = to_bond(d); in bonding_show_miimon() local
429 return sysfs_emit(buf, "%d\n", bond->params.miimon); in bonding_show_miimon()
439 struct bonding *bond = to_bond(d); in bonding_show_primary() local
444 primary = rcu_dereference(bond->primary_slave); in bonding_show_primary()
459 struct bonding *bond = to_bond(d); in bonding_show_primary_reselect() local
463 bond->params.primary_reselect); in bonding_show_primary_reselect()
466 val->string, bond->params.primary_reselect); in bonding_show_primary_reselect()
476 struct bonding *bond = to_bond(d); in bonding_show_carrier() local
478 return sysfs_emit(buf, "%d\n", bond->params.use_carrier); in bonding_show_carrier()
489 struct bonding *bond = to_bond(d); in bonding_show_active_slave() local
494 slave_dev = bond_option_active_slave_get_rcu(bond); in bonding_show_active_slave()
504 /* Show link status of the bond interface. */
509 struct bonding *bond = to_bond(d); in bonding_show_mii_status() local
510 bool active = netif_carrier_ok(bond->dev); in bonding_show_mii_status()
522 struct bonding *bond = to_bond(d); in bonding_show_ad_aggregator() local
524 if (BOND_MODE(bond) == BOND_MODE_8023AD) { in bonding_show_ad_aggregator()
528 bond_3ad_get_active_agg_info(bond, &ad_info) in bonding_show_ad_aggregator()
543 struct bonding *bond = to_bond(d); in bonding_show_ad_num_ports() local
545 if (BOND_MODE(bond) == BOND_MODE_8023AD) { in bonding_show_ad_num_ports()
549 bond_3ad_get_active_agg_info(bond, &ad_info) in bonding_show_ad_num_ports()
564 struct bonding *bond = to_bond(d); in bonding_show_ad_actor_key() local
566 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) { in bonding_show_ad_actor_key()
570 bond_3ad_get_active_agg_info(bond, &ad_info) in bonding_show_ad_actor_key()
585 struct bonding *bond = to_bond(d); in bonding_show_ad_partner_key() local
587 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) { in bonding_show_ad_partner_key()
591 bond_3ad_get_active_agg_info(bond, &ad_info) in bonding_show_ad_partner_key()
606 struct bonding *bond = to_bond(d); in bonding_show_ad_partner_mac() local
608 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) { in bonding_show_ad_partner_mac()
611 if (!bond_3ad_get_active_agg_info(bond, &ad_info)) in bonding_show_ad_partner_mac()
619 /* Show the queue_ids of the slaves in the current bond. */
624 struct bonding *bond = to_bond(d); in bonding_show_queue_id() local
632 bond_for_each_slave(bond, slave, iter) { in bonding_show_queue_id()
659 struct bonding *bond = to_bond(d); in bonding_show_slaves_active() local
661 return sysfs_emit(buf, "%d\n", bond->params.all_slaves_active); in bonding_show_slaves_active()
671 struct bonding *bond = to_bond(d); in bonding_show_resend_igmp() local
673 return sysfs_emit(buf, "%d\n", bond->params.resend_igmp); in bonding_show_resend_igmp()
683 struct bonding *bond = to_bond(d); in bonding_show_lp_interval() local
685 return sysfs_emit(buf, "%d\n", bond->params.lp_interval); in bonding_show_lp_interval()
694 struct bonding *bond = to_bond(d); in bonding_show_tlb_dynamic_lb() local
696 return sysfs_emit(buf, "%d\n", bond->params.tlb_dynamic_lb); in bonding_show_tlb_dynamic_lb()
705 struct bonding *bond = to_bond(d); in bonding_show_packets_per_slave() local
706 unsigned int packets_per_slave = bond->params.packets_per_slave; in bonding_show_packets_per_slave()
717 struct bonding *bond = to_bond(d); in bonding_show_ad_actor_sys_prio() local
719 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) in bonding_show_ad_actor_sys_prio()
720 return sysfs_emit(buf, "%hu\n", bond->params.ad_actor_sys_prio); in bonding_show_ad_actor_sys_prio()
731 struct bonding *bond = to_bond(d); in bonding_show_ad_actor_system() local
733 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) in bonding_show_ad_actor_system()
734 return sysfs_emit(buf, "%pM\n", bond->params.ad_actor_system); in bonding_show_ad_actor_system()
746 struct bonding *bond = to_bond(d); in bonding_show_ad_user_port_key() local
748 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) in bonding_show_ad_user_port_key()
749 return sysfs_emit(buf, "%hu\n", bond->params.ad_user_port_key); in bonding_show_ad_user_port_key()
844 /* Initialize sysfs for each bond. This sets up and registers
845 * the 'bondctl' directory for each individual bond under /sys/class/net.
847 void bond_prepare_sysfs_group(struct bonding *bond) in bond_prepare_sysfs_group() argument
849 bond->dev->sysfs_groups[0] = &bonding_group; in bond_prepare_sysfs_group()