Lines Matching defs:bond
41 struct bonding *bond;
45 list_for_each_entry(bond, &bn->dev_list, bond_list) {
53 res += sprintf(buf + res, "%s ", bond->dev->name);
64 struct bonding *bond;
66 list_for_each_entry(bond, &bn->dev_list, bond_list) {
67 if (strncmp(bond->dev->name, ifname, IFNAMSIZ) == 0)
68 return bond->dev;
145 struct bonding *bond = to_bond(d);
156 ret = bond_opt_tryset_rtnl(bond, opt->id, buffer_clone);
164 /* Show the slaves in the current bond. */
168 struct bonding *bond = to_bond(d);
176 bond_for_each_slave(bond, slave, iter) {
201 struct bonding *bond = to_bond(d);
204 val = bond_opt_get_val(BOND_OPT_MODE, BOND_MODE(bond));
206 return sprintf(buf, "%s %d\n", val->string, BOND_MODE(bond));
215 struct bonding *bond = to_bond(d);
218 val = bond_opt_get_val(BOND_OPT_XMIT_HASH, bond->params.xmit_policy);
220 return sprintf(buf, "%s %d\n", val->string, bond->params.xmit_policy);
230 struct bonding *bond = to_bond(d);
234 bond->params.arp_validate);
236 return sprintf(buf, "%s %d\n", val->string, bond->params.arp_validate);
246 struct bonding *bond = to_bond(d);
250 bond->params.arp_all_targets);
252 val->string, bond->params.arp_all_targets);
262 struct bonding *bond = to_bond(d);
266 bond->params.fail_over_mac);
268 return sprintf(buf, "%s %d\n", val->string, bond->params.fail_over_mac);
278 struct bonding *bond = to_bond(d);
280 return sprintf(buf, "%d\n", bond->params.arp_interval);
290 struct bonding *bond = to_bond(d);
294 if (bond->params.arp_targets[i])
296 &bond->params.arp_targets[i]);
311 struct bonding *bond = to_bond(d);
313 return sprintf(buf, "%d\n", bond->params.downdelay * bond->params.miimon);
322 struct bonding *bond = to_bond(d);
324 return sprintf(buf, "%d\n", bond->params.updelay * bond->params.miimon);
334 struct bonding *bond = to_bond(d);
337 bond->params.peer_notif_delay * bond->params.miimon);
347 struct bonding *bond = to_bond(d);
350 val = bond_opt_get_val(BOND_OPT_LACP_RATE, bond->params.lacp_fast);
352 return sprintf(buf, "%s %d\n", val->string, bond->params.lacp_fast);
361 struct bonding *bond = to_bond(d);
363 return sprintf(buf, "%u\n", bond->params.min_links);
372 struct bonding *bond = to_bond(d);
375 val = bond_opt_get_val(BOND_OPT_AD_SELECT, bond->params.ad_select);
377 return sprintf(buf, "%s %d\n", val->string, bond->params.ad_select);
387 struct bonding *bond = to_bond(d);
388 return sprintf(buf, "%d\n", bond->params.num_peer_notif);
400 struct bonding *bond = to_bond(d);
402 return sprintf(buf, "%d\n", bond->params.miimon);
412 struct bonding *bond = to_bond(d);
417 primary = rcu_dereference(bond->primary_slave);
432 struct bonding *bond = to_bond(d);
436 bond->params.primary_reselect);
439 val->string, bond->params.primary_reselect);
449 struct bonding *bond = to_bond(d);
451 return sprintf(buf, "%d\n", bond->params.use_carrier);
462 struct bonding *bond = to_bond(d);
467 slave_dev = bond_option_active_slave_get_rcu(bond);
477 /* Show link status of the bond interface. */
482 struct bonding *bond = to_bond(d);
483 bool active = netif_carrier_ok(bond->dev);
495 struct bonding *bond = to_bond(d);
497 if (BOND_MODE(bond) == BOND_MODE_8023AD) {
500 bond_3ad_get_active_agg_info(bond, &ad_info)
515 struct bonding *bond = to_bond(d);
517 if (BOND_MODE(bond) == BOND_MODE_8023AD) {
520 bond_3ad_get_active_agg_info(bond, &ad_info)
535 struct bonding *bond = to_bond(d);
537 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) {
540 bond_3ad_get_active_agg_info(bond, &ad_info)
555 struct bonding *bond = to_bond(d);
557 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) {
560 bond_3ad_get_active_agg_info(bond, &ad_info)
575 struct bonding *bond = to_bond(d);
577 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) {
579 if (!bond_3ad_get_active_agg_info(bond, &ad_info))
587 /* Show the queue_ids of the slaves in the current bond. */
592 struct bonding *bond = to_bond(d);
600 bond_for_each_slave(bond, slave, iter) {
627 struct bonding *bond = to_bond(d);
629 return sprintf(buf, "%d\n", bond->params.all_slaves_active);
639 struct bonding *bond = to_bond(d);
641 return sprintf(buf, "%d\n", bond->params.resend_igmp);
651 struct bonding *bond = to_bond(d);
653 return sprintf(buf, "%d\n", bond->params.lp_interval);
662 struct bonding *bond = to_bond(d);
663 return sprintf(buf, "%d\n", bond->params.tlb_dynamic_lb);
672 struct bonding *bond = to_bond(d);
673 unsigned int packets_per_slave = bond->params.packets_per_slave;
684 struct bonding *bond = to_bond(d);
686 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN))
687 return sprintf(buf, "%hu\n", bond->params.ad_actor_sys_prio);
698 struct bonding *bond = to_bond(d);
700 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN))
701 return sprintf(buf, "%pM\n", bond->params.ad_actor_system);
713 struct bonding *bond = to_bond(d);
715 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN))
716 return sprintf(buf, "%hu\n", bond->params.ad_user_port_key);
809 /* Initialize sysfs for each bond. This sets up and registers
810 * the 'bondctl' directory for each individual bond under /sys/class/net.
812 void bond_prepare_sysfs_group(struct bonding *bond)
814 bond->dev->sysfs_groups[0] = &bonding_group;