Lines Matching refs:bond
40 struct bonding *bond;
45 list_for_each_entry_rcu(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);
175 bond_for_each_slave_rcu(bond, slave, iter) {
200 struct bonding *bond = to_bond(d);
203 val = bond_opt_get_val(BOND_OPT_MODE, BOND_MODE(bond));
205 return sysfs_emit(buf, "%s %d\n", val->string, BOND_MODE(bond));
214 struct bonding *bond = to_bond(d);
217 val = bond_opt_get_val(BOND_OPT_XMIT_HASH, bond->params.xmit_policy);
219 return sysfs_emit(buf, "%s %d\n", val->string, bond->params.xmit_policy);
229 struct bonding *bond = to_bond(d);
233 bond->params.arp_validate);
235 return sysfs_emit(buf, "%s %d\n", val->string, bond->params.arp_validate);
245 struct bonding *bond = to_bond(d);
249 bond->params.arp_all_targets);
251 val->string, bond->params.arp_all_targets);
261 struct bonding *bond = to_bond(d);
265 bond->params.fail_over_mac);
267 return sysfs_emit(buf, "%s %d\n", val->string, bond->params.fail_over_mac);
277 struct bonding *bond = to_bond(d);
279 return sysfs_emit(buf, "%d\n", bond->params.arp_interval);
289 struct bonding *bond = to_bond(d);
293 if (bond->params.arp_targets[i])
295 &bond->params.arp_targets[i]);
310 struct bonding *bond = to_bond(d);
312 return sysfs_emit(buf, "%u\n", bond->params.missed_max);
322 struct bonding *bond = to_bond(d);
324 return sysfs_emit(buf, "%d\n", bond->params.downdelay * bond->params.miimon);
333 struct bonding *bond = to_bond(d);
335 return sysfs_emit(buf, "%d\n", bond->params.updelay * bond->params.miimon);
345 struct bonding *bond = to_bond(d);
348 bond->params.peer_notif_delay * bond->params.miimon);
358 struct bonding *bond = to_bond(d);
361 val = bond_opt_get_val(BOND_OPT_LACP_ACTIVE, bond->params.lacp_active);
363 return sysfs_emit(buf, "%s %d\n", val->string, bond->params.lacp_active);
372 struct bonding *bond = to_bond(d);
375 val = bond_opt_get_val(BOND_OPT_LACP_RATE, bond->params.lacp_fast);
377 return sysfs_emit(buf, "%s %d\n", val->string, bond->params.lacp_fast);
386 struct bonding *bond = to_bond(d);
388 return sysfs_emit(buf, "%u\n", bond->params.min_links);
397 struct bonding *bond = to_bond(d);
400 val = bond_opt_get_val(BOND_OPT_AD_SELECT, bond->params.ad_select);
402 return sysfs_emit(buf, "%s %d\n", val->string, bond->params.ad_select);
412 struct bonding *bond = to_bond(d);
414 return sysfs_emit(buf, "%d\n", bond->params.num_peer_notif);
426 struct bonding *bond = to_bond(d);
428 return sysfs_emit(buf, "%d\n", bond->params.miimon);
438 struct bonding *bond = to_bond(d);
443 primary = rcu_dereference(bond->primary_slave);
458 struct bonding *bond = to_bond(d);
462 bond->params.primary_reselect);
465 val->string, bond->params.primary_reselect);
475 struct bonding *bond = to_bond(d);
477 return sysfs_emit(buf, "%d\n", bond->params.use_carrier);
488 struct bonding *bond = to_bond(d);
493 slave_dev = bond_option_active_slave_get_rcu(bond);
503 /* Show link status of the bond interface. */
508 struct bonding *bond = to_bond(d);
509 bool active = netif_carrier_ok(bond->dev);
521 struct bonding *bond = to_bond(d);
523 if (BOND_MODE(bond) == BOND_MODE_8023AD) {
527 bond_3ad_get_active_agg_info(bond, &ad_info)
542 struct bonding *bond = to_bond(d);
544 if (BOND_MODE(bond) == BOND_MODE_8023AD) {
548 bond_3ad_get_active_agg_info(bond, &ad_info)
563 struct bonding *bond = to_bond(d);
565 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) {
569 bond_3ad_get_active_agg_info(bond, &ad_info)
584 struct bonding *bond = to_bond(d);
586 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) {
590 bond_3ad_get_active_agg_info(bond, &ad_info)
605 struct bonding *bond = to_bond(d);
607 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN)) {
610 if (!bond_3ad_get_active_agg_info(bond, &ad_info))
618 /* Show the queue_ids of the slaves in the current bond. */
623 struct bonding *bond = to_bond(d);
630 bond_for_each_slave_rcu(bond, slave, iter) {
658 struct bonding *bond = to_bond(d);
660 return sysfs_emit(buf, "%d\n", bond->params.all_slaves_active);
670 struct bonding *bond = to_bond(d);
672 return sysfs_emit(buf, "%d\n", bond->params.resend_igmp);
682 struct bonding *bond = to_bond(d);
684 return sysfs_emit(buf, "%d\n", bond->params.lp_interval);
693 struct bonding *bond = to_bond(d);
695 return sysfs_emit(buf, "%d\n", bond->params.tlb_dynamic_lb);
704 struct bonding *bond = to_bond(d);
705 unsigned int packets_per_slave = bond->params.packets_per_slave;
716 struct bonding *bond = to_bond(d);
718 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN))
719 return sysfs_emit(buf, "%hu\n", bond->params.ad_actor_sys_prio);
730 struct bonding *bond = to_bond(d);
732 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN))
733 return sysfs_emit(buf, "%pM\n", bond->params.ad_actor_system);
745 struct bonding *bond = to_bond(d);
747 if (BOND_MODE(bond) == BOND_MODE_8023AD && capable(CAP_NET_ADMIN))
748 return sysfs_emit(buf, "%hu\n", bond->params.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)
848 bond->dev->sysfs_groups[0] = &bonding_group;