Lines Matching full:bond

40 	struct bonding *bond;  in bonding_show_bonds()  local
45 list_for_each_entry_rcu(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
175 bond_for_each_slave_rcu(bond, slave, iter) { in bonding_show_slaves()
200 struct bonding *bond = to_bond(d); in bonding_show_mode() local
203 val = bond_opt_get_val(BOND_OPT_MODE, BOND_MODE(bond)); in bonding_show_mode()
205 return sysfs_emit(buf, "%s %d\n", val->string, BOND_MODE(bond)); in bonding_show_mode()
214 struct bonding *bond = to_bond(d); in bonding_show_xmit_hash() local
217 val = bond_opt_get_val(BOND_OPT_XMIT_HASH, bond->params.xmit_policy); in bonding_show_xmit_hash()
219 return sysfs_emit(buf, "%s %d\n", val->string, bond->params.xmit_policy); in bonding_show_xmit_hash()
229 struct bonding *bond = to_bond(d); in bonding_show_arp_validate() local
233 bond->params.arp_validate); in bonding_show_arp_validate()
235 return sysfs_emit(buf, "%s %d\n", val->string, bond->params.arp_validate); in bonding_show_arp_validate()
245 struct bonding *bond = to_bond(d); in bonding_show_arp_all_targets() local
249 bond->params.arp_all_targets); in bonding_show_arp_all_targets()
251 val->string, bond->params.arp_all_targets); in bonding_show_arp_all_targets()
261 struct bonding *bond = to_bond(d); in bonding_show_fail_over_mac() local
265 bond->params.fail_over_mac); in bonding_show_fail_over_mac()
267 return sysfs_emit(buf, "%s %d\n", val->string, bond->params.fail_over_mac); in bonding_show_fail_over_mac()
277 struct bonding *bond = to_bond(d); in bonding_show_arp_interval() local
279 return sysfs_emit(buf, "%d\n", bond->params.arp_interval); in bonding_show_arp_interval()
289 struct bonding *bond = to_bond(d); in bonding_show_arp_targets() local
293 if (bond->params.arp_targets[i]) in bonding_show_arp_targets()
295 &bond->params.arp_targets[i]); in bonding_show_arp_targets()
310 struct bonding *bond = to_bond(d); in bonding_show_missed_max() local
312 return sysfs_emit(buf, "%u\n", bond->params.missed_max); in bonding_show_missed_max()
322 struct bonding *bond = to_bond(d); in bonding_show_downdelay() local
324 return sysfs_emit(buf, "%d\n", bond->params.downdelay * bond->params.miimon); in bonding_show_downdelay()
333 struct bonding *bond = to_bond(d); in bonding_show_updelay() local
335 return sysfs_emit(buf, "%d\n", bond->params.updelay * bond->params.miimon); in bonding_show_updelay()
345 struct bonding *bond = to_bond(d); in bonding_show_peer_notif_delay() local
348 bond->params.peer_notif_delay * bond->params.miimon); in bonding_show_peer_notif_delay()
358 struct bonding *bond = to_bond(d); in bonding_show_lacp_active() local
361 val = bond_opt_get_val(BOND_OPT_LACP_ACTIVE, bond->params.lacp_active); in bonding_show_lacp_active()
363 return sysfs_emit(buf, "%s %d\n", val->string, bond->params.lacp_active); in bonding_show_lacp_active()
372 struct bonding *bond = to_bond(d); in bonding_show_lacp_rate() local
375 val = bond_opt_get_val(BOND_OPT_LACP_RATE, bond->params.lacp_fast); in bonding_show_lacp_rate()
377 return sysfs_emit(buf, "%s %d\n", val->string, bond->params.lacp_fast); in bonding_show_lacp_rate()
386 struct bonding *bond = to_bond(d); in bonding_show_min_links() local
388 return sysfs_emit(buf, "%u\n", bond->params.min_links); in bonding_show_min_links()
397 struct bonding *bond = to_bond(d); in bonding_show_ad_select() local
400 val = bond_opt_get_val(BOND_OPT_AD_SELECT, bond->params.ad_select); in bonding_show_ad_select()
402 return sysfs_emit(buf, "%s %d\n", val->string, bond->params.ad_select); in bonding_show_ad_select()
412 struct bonding *bond = to_bond(d); in bonding_show_num_peer_notif() local
414 return sysfs_emit(buf, "%d\n", bond->params.num_peer_notif); in bonding_show_num_peer_notif()
426 struct bonding *bond = to_bond(d); in bonding_show_miimon() local
428 return sysfs_emit(buf, "%d\n", bond->params.miimon); in bonding_show_miimon()
438 struct bonding *bond = to_bond(d); in bonding_show_primary() local
443 primary = rcu_dereference(bond->primary_slave); in bonding_show_primary()
458 struct bonding *bond = to_bond(d); in bonding_show_primary_reselect() local
462 bond->params.primary_reselect); in bonding_show_primary_reselect()
465 val->string, bond->params.primary_reselect); in bonding_show_primary_reselect()
475 struct bonding *bond = to_bond(d); in bonding_show_carrier() local
477 return sysfs_emit(buf, "%d\n", bond->params.use_carrier); in bonding_show_carrier()
488 struct bonding *bond = to_bond(d); in bonding_show_active_slave() local
493 slave_dev = bond_option_active_slave_get_rcu(bond); in bonding_show_active_slave()
503 /* Show link status of the bond interface. */
508 struct bonding *bond = to_bond(d); in bonding_show_mii_status() local
509 bool active = netif_carrier_ok(bond->dev); in bonding_show_mii_status()
521 struct bonding *bond = to_bond(d); in bonding_show_ad_aggregator() local
523 if (BOND_MODE(bond) == BOND_MODE_8023AD) { in bonding_show_ad_aggregator()
527 bond_3ad_get_active_agg_info(bond, &ad_info) in bonding_show_ad_aggregator()
542 struct bonding *bond = to_bond(d); in bonding_show_ad_num_ports() local
544 if (BOND_MODE(bond) == BOND_MODE_8023AD) { in bonding_show_ad_num_ports()
548 bond_3ad_get_active_agg_info(bond, &ad_info) in bonding_show_ad_num_ports()
563 struct bonding *bond = to_bond(d); in bonding_show_ad_actor_key() local
565 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) { in bonding_show_ad_actor_key()
569 bond_3ad_get_active_agg_info(bond, &ad_info) in bonding_show_ad_actor_key()
584 struct bonding *bond = to_bond(d); in bonding_show_ad_partner_key() local
586 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) { in bonding_show_ad_partner_key()
590 bond_3ad_get_active_agg_info(bond, &ad_info) in bonding_show_ad_partner_key()
605 struct bonding *bond = to_bond(d); in bonding_show_ad_partner_mac() local
607 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) { in bonding_show_ad_partner_mac()
610 if (!bond_3ad_get_active_agg_info(bond, &ad_info)) in bonding_show_ad_partner_mac()
618 /* Show the queue_ids of the slaves in the current bond. */
623 struct bonding *bond = to_bond(d); in bonding_show_queue_id() local
630 bond_for_each_slave_rcu(bond, slave, iter) { in bonding_show_queue_id()
658 struct bonding *bond = to_bond(d); in bonding_show_slaves_active() local
660 return sysfs_emit(buf, "%d\n", bond->params.all_slaves_active); in bonding_show_slaves_active()
670 struct bonding *bond = to_bond(d); in bonding_show_resend_igmp() local
672 return sysfs_emit(buf, "%d\n", bond->params.resend_igmp); in bonding_show_resend_igmp()
682 struct bonding *bond = to_bond(d); in bonding_show_lp_interval() local
684 return sysfs_emit(buf, "%d\n", bond->params.lp_interval); in bonding_show_lp_interval()
693 struct bonding *bond = to_bond(d); in bonding_show_tlb_dynamic_lb() local
695 return sysfs_emit(buf, "%d\n", bond->params.tlb_dynamic_lb); in bonding_show_tlb_dynamic_lb()
704 struct bonding *bond = to_bond(d); in bonding_show_packets_per_slave() local
705 unsigned int packets_per_slave = bond->params.packets_per_slave; in bonding_show_packets_per_slave()
716 struct bonding *bond = to_bond(d); in bonding_show_ad_actor_sys_prio() local
718 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) in bonding_show_ad_actor_sys_prio()
719 return sysfs_emit(buf, "%hu\n", bond->params.ad_actor_sys_prio); in bonding_show_ad_actor_sys_prio()
730 struct bonding *bond = to_bond(d); in bonding_show_ad_actor_system() local
732 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) in bonding_show_ad_actor_system()
733 return sysfs_emit(buf, "%pM\n", bond->params.ad_actor_system); in bonding_show_ad_actor_system()
745 struct bonding *bond = to_bond(d); in bonding_show_ad_user_port_key() local
747 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) in bonding_show_ad_user_port_key()
748 return sysfs_emit(buf, "%hu\n", bond->params.ad_user_port_key); in bonding_show_ad_user_port_key()
843 /* Initialize sysfs for each bond. This sets up and registers
844 * the 'bondctl' directory for each individual bond under /sys/class/net.
846 void bond_prepare_sysfs_group(struct bonding *bond) in bond_prepare_sysfs_group() argument
848 bond->dev->sysfs_groups[0] = &bonding_group; in bond_prepare_sysfs_group()