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() local
350 val = bond_opt_get_val(BOND_OPT_LACP_RATE, bond->params.lacp_fast); in bonding_show_lacp()
352 return sprintf(buf, "%s %d\n", val->string, bond->params.lacp_fast); in bonding_show_lacp()
361 struct bonding *bond = to_bond(d); in bonding_show_min_links() local
363 return sprintf(buf, "%u\n", bond->params.min_links); in bonding_show_min_links()
372 struct bonding *bond = to_bond(d); in bonding_show_ad_select() local
375 val = bond_opt_get_val(BOND_OPT_AD_SELECT, bond->params.ad_select); in bonding_show_ad_select()
377 return sprintf(buf, "%s %d\n", val->string, bond->params.ad_select); in bonding_show_ad_select()
387 struct bonding *bond = to_bond(d); in bonding_show_num_peer_notif() local
388 return sprintf(buf, "%d\n", bond->params.num_peer_notif); in bonding_show_num_peer_notif()
400 struct bonding *bond = to_bond(d); in bonding_show_miimon() local
402 return sprintf(buf, "%d\n", bond->params.miimon); in bonding_show_miimon()
412 struct bonding *bond = to_bond(d); in bonding_show_primary() local
417 primary = rcu_dereference(bond->primary_slave); in bonding_show_primary()
432 struct bonding *bond = to_bond(d); in bonding_show_primary_reselect() local
436 bond->params.primary_reselect); in bonding_show_primary_reselect()
439 val->string, bond->params.primary_reselect); in bonding_show_primary_reselect()
449 struct bonding *bond = to_bond(d); in bonding_show_carrier() local
451 return sprintf(buf, "%d\n", bond->params.use_carrier); in bonding_show_carrier()
462 struct bonding *bond = to_bond(d); in bonding_show_active_slave() local
467 slave_dev = bond_option_active_slave_get_rcu(bond); in bonding_show_active_slave()
482 struct bonding *bond = to_bond(d); in bonding_show_mii_status() local
483 bool active = netif_carrier_ok(bond->dev); in bonding_show_mii_status()
495 struct bonding *bond = to_bond(d); in bonding_show_ad_aggregator() local
497 if (BOND_MODE(bond) == BOND_MODE_8023AD) { in bonding_show_ad_aggregator()
500 bond_3ad_get_active_agg_info(bond, &ad_info) in bonding_show_ad_aggregator()
515 struct bonding *bond = to_bond(d); in bonding_show_ad_num_ports() local
517 if (BOND_MODE(bond) == BOND_MODE_8023AD) { in bonding_show_ad_num_ports()
520 bond_3ad_get_active_agg_info(bond, &ad_info) in bonding_show_ad_num_ports()
535 struct bonding *bond = to_bond(d); in bonding_show_ad_actor_key() local
537 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) { in bonding_show_ad_actor_key()
540 bond_3ad_get_active_agg_info(bond, &ad_info) in bonding_show_ad_actor_key()
555 struct bonding *bond = to_bond(d); in bonding_show_ad_partner_key() local
557 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) { in bonding_show_ad_partner_key()
560 bond_3ad_get_active_agg_info(bond, &ad_info) in bonding_show_ad_partner_key()
575 struct bonding *bond = to_bond(d); in bonding_show_ad_partner_mac() local
577 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) { in bonding_show_ad_partner_mac()
579 if (!bond_3ad_get_active_agg_info(bond, &ad_info)) in bonding_show_ad_partner_mac()
592 struct bonding *bond = to_bond(d); in bonding_show_queue_id() local
600 bond_for_each_slave(bond, slave, iter) { in bonding_show_queue_id()
627 struct bonding *bond = to_bond(d); in bonding_show_slaves_active() local
629 return sprintf(buf, "%d\n", bond->params.all_slaves_active); in bonding_show_slaves_active()
639 struct bonding *bond = to_bond(d); in bonding_show_resend_igmp() local
641 return sprintf(buf, "%d\n", bond->params.resend_igmp); in bonding_show_resend_igmp()
651 struct bonding *bond = to_bond(d); in bonding_show_lp_interval() local
653 return sprintf(buf, "%d\n", bond->params.lp_interval); in bonding_show_lp_interval()
662 struct bonding *bond = to_bond(d); in bonding_show_tlb_dynamic_lb() local
663 return sprintf(buf, "%d\n", bond->params.tlb_dynamic_lb); in bonding_show_tlb_dynamic_lb()
672 struct bonding *bond = to_bond(d); in bonding_show_packets_per_slave() local
673 unsigned int packets_per_slave = bond->params.packets_per_slave; in bonding_show_packets_per_slave()
684 struct bonding *bond = to_bond(d); in bonding_show_ad_actor_sys_prio() local
686 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) in bonding_show_ad_actor_sys_prio()
687 return sprintf(buf, "%hu\n", bond->params.ad_actor_sys_prio); in bonding_show_ad_actor_sys_prio()
698 struct bonding *bond = to_bond(d); in bonding_show_ad_actor_system() local
700 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) in bonding_show_ad_actor_system()
701 return sprintf(buf, "%pM\n", bond->params.ad_actor_system); in bonding_show_ad_actor_system()
713 struct bonding *bond = to_bond(d); in bonding_show_ad_user_port_key() local
715 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) in bonding_show_ad_user_port_key()
716 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()