Lines Matching refs:bond

41 	struct bonding *bond;
45 list_for_each_entry(bond, &bn->dev_list, bond_list) {
53 res += sysfs_emit_at(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 sysfs_emit(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 sysfs_emit(buf, "%s %d\n", val->string, bond->params.xmit_policy);
230 struct bonding *bond = to_bond(d);
234 bond->params.arp_validate);
236 return sysfs_emit(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 sysfs_emit(buf, "%s %d\n", val->string, bond->params.fail_over_mac);
278 struct bonding *bond = to_bond(d);
280 return sysfs_emit(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 sysfs_emit(buf, "%u\n", bond->params.missed_max);
323 struct bonding *bond = to_bond(d);
325 return sysfs_emit(buf, "%d\n", bond->params.downdelay * bond->params.miimon);
334 struct bonding *bond = to_bond(d);
336 return sysfs_emit(buf, "%d\n", bond->params.updelay * bond->params.miimon);
346 struct bonding *bond = to_bond(d);
349 bond->params.peer_notif_delay * bond->params.miimon);
359 struct bonding *bond = to_bond(d);
362 val = bond_opt_get_val(BOND_OPT_LACP_ACTIVE, bond->params.lacp_active);
364 return sysfs_emit(buf, "%s %d\n", val->string, bond->params.lacp_active);
373 struct bonding *bond = to_bond(d);
376 val = bond_opt_get_val(BOND_OPT_LACP_RATE, bond->params.lacp_fast);
378 return sysfs_emit(buf, "%s %d\n", val->string, bond->params.lacp_fast);
387 struct bonding *bond = to_bond(d);
389 return sysfs_emit(buf, "%u\n", bond->params.min_links);
398 struct bonding *bond = to_bond(d);
401 val = bond_opt_get_val(BOND_OPT_AD_SELECT, bond->params.ad_select);
403 return sysfs_emit(buf, "%s %d\n", val->string, bond->params.ad_select);
413 struct bonding *bond = to_bond(d);
415 return sysfs_emit(buf, "%d\n", bond->params.num_peer_notif);
427 struct bonding *bond = to_bond(d);
429 return sysfs_emit(buf, "%d\n", bond->params.miimon);
439 struct bonding *bond = to_bond(d);
444 primary = rcu_dereference(bond->primary_slave);
459 struct bonding *bond = to_bond(d);
463 bond->params.primary_reselect);
466 val->string, bond->params.primary_reselect);
476 struct bonding *bond = to_bond(d);
478 return sysfs_emit(buf, "%d\n", bond->params.use_carrier);
489 struct bonding *bond = to_bond(d);
494 slave_dev = bond_option_active_slave_get_rcu(bond);
504 /* Show link status of the bond interface. */
509 struct bonding *bond = to_bond(d);
510 bool active = netif_carrier_ok(bond->dev);
522 struct bonding *bond = to_bond(d);
524 if (BOND_MODE(bond) == BOND_MODE_8023AD) {
528 bond_3ad_get_active_agg_info(bond, &ad_info)
543 struct bonding *bond = to_bond(d);
545 if (BOND_MODE(bond) == BOND_MODE_8023AD) {
549 bond_3ad_get_active_agg_info(bond, &ad_info)
564 struct bonding *bond = to_bond(d);
566 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) {
570 bond_3ad_get_active_agg_info(bond, &ad_info)
585 struct bonding *bond = to_bond(d);
587 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) {
591 bond_3ad_get_active_agg_info(bond, &ad_info)
606 struct bonding *bond = to_bond(d);
608 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) {
611 if (!bond_3ad_get_active_agg_info(bond, &ad_info))
619 /* Show the queue_ids of the slaves in the current bond. */
624 struct bonding *bond = to_bond(d);
632 bond_for_each_slave(bond, slave, iter) {
659 struct bonding *bond = to_bond(d);
661 return sysfs_emit(buf, "%d\n", bond->params.all_slaves_active);
671 struct bonding *bond = to_bond(d);
673 return sysfs_emit(buf, "%d\n", bond->params.resend_igmp);
683 struct bonding *bond = to_bond(d);
685 return sysfs_emit(buf, "%d\n", bond->params.lp_interval);
694 struct bonding *bond = to_bond(d);
696 return sysfs_emit(buf, "%d\n", bond->params.tlb_dynamic_lb);
705 struct bonding *bond = to_bond(d);
706 unsigned int packets_per_slave = bond->params.packets_per_slave;
717 struct bonding *bond = to_bond(d);
719 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN))
720 return sysfs_emit(buf, "%hu\n", bond->params.ad_actor_sys_prio);
731 struct bonding *bond = to_bond(d);
733 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN))
734 return sysfs_emit(buf, "%pM\n", bond->params.ad_actor_system);
746 struct bonding *bond = to_bond(d);
748 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN))
749 return sysfs_emit(buf, "%hu\n", bond->params.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)
849 bond->dev->sysfs_groups[0] = &bonding_group;