Lines Matching full:bond
3 * drivers/net/bond/bond_netlink.c - Netlink interface for bonding
60 if (BOND_MODE(slave->bond) == BOND_MODE_8023AD) { in bond_fill_slave_info()
149 struct bonding *bond = netdev_priv(bond_dev); in bond_slave_changelink() local
164 err = __bond_opt_set(bond, BOND_OPT_QUEUE_ID, &newval, in bond_slave_changelink()
174 err = __bond_opt_set(bond, BOND_OPT_PRIO, &newval, in bond_slave_changelink()
187 struct bonding *bond = netdev_priv(bond_dev); in bond_changelink() local
199 err = __bond_opt_set(bond, BOND_OPT_MODE, &newval, in bond_changelink()
217 err = __bond_opt_set(bond, BOND_OPT_ACTIVE_SLAVE, &newval, in bond_changelink()
226 err = __bond_opt_set(bond, BOND_OPT_MIIMON, &newval, in bond_changelink()
235 err = __bond_opt_set(bond, BOND_OPT_UPDELAY, &newval, in bond_changelink()
244 err = __bond_opt_set(bond, BOND_OPT_DOWNDELAY, &newval, in bond_changelink()
253 err = __bond_opt_set(bond, BOND_OPT_PEER_NOTIF_DELAY, &newval, in bond_changelink()
262 err = __bond_opt_set(bond, BOND_OPT_USE_CARRIER, &newval, in bond_changelink()
277 err = __bond_opt_set(bond, BOND_OPT_ARP_INTERVAL, &newval, in bond_changelink()
286 bond_option_arp_ip_targets_clear(bond); in bond_changelink()
296 err = __bond_opt_set(bond, BOND_OPT_ARP_TARGETS, in bond_changelink()
304 if (i == 0 && bond->params.arp_interval) in bond_changelink()
305 netdev_warn(bond->dev, "Removing last arp target with arp_interval on\n"); in bond_changelink()
314 bond_option_ns_ip6_targets_clear(bond); in bond_changelink()
326 err = __bond_opt_set(bond, BOND_OPT_NS_TARGETS, in bond_changelink()
334 if (i == 0 && bond->params.arp_interval) in bond_changelink()
335 netdev_warn(bond->dev, "Removing last ns target with arp_interval on\n"); in bond_changelink()
350 err = __bond_opt_set(bond, BOND_OPT_ARP_VALIDATE, &newval, in bond_changelink()
360 err = __bond_opt_set(bond, BOND_OPT_ARP_ALL_TARGETS, &newval, in bond_changelink()
375 err = __bond_opt_set(bond, BOND_OPT_PRIMARY, &newval, in bond_changelink()
385 err = __bond_opt_set(bond, BOND_OPT_PRIMARY_RESELECT, &newval, in bond_changelink()
395 err = __bond_opt_set(bond, BOND_OPT_FAIL_OVER_MAC, &newval, in bond_changelink()
405 err = __bond_opt_set(bond, BOND_OPT_XMIT_HASH, &newval, in bond_changelink()
415 err = __bond_opt_set(bond, BOND_OPT_RESEND_IGMP, &newval, in bond_changelink()
425 err = __bond_opt_set(bond, BOND_OPT_NUM_PEER_NOTIF, &newval, in bond_changelink()
435 err = __bond_opt_set(bond, BOND_OPT_ALL_SLAVES_ACTIVE, &newval, in bond_changelink()
445 err = __bond_opt_set(bond, BOND_OPT_MINLINKS, &newval, in bond_changelink()
455 err = __bond_opt_set(bond, BOND_OPT_LP_INTERVAL, &newval, in bond_changelink()
465 err = __bond_opt_set(bond, BOND_OPT_PACKETS_PER_SLAVE, &newval, in bond_changelink()
475 err = __bond_opt_set(bond, BOND_OPT_LACP_ACTIVE, &newval, in bond_changelink()
486 err = __bond_opt_set(bond, BOND_OPT_LACP_RATE, &newval, in bond_changelink()
496 err = __bond_opt_set(bond, BOND_OPT_AD_SELECT, &newval, in bond_changelink()
506 err = __bond_opt_set(bond, BOND_OPT_AD_ACTOR_SYS_PRIO, &newval, in bond_changelink()
516 err = __bond_opt_set(bond, BOND_OPT_AD_USER_PORT_KEY, &newval, in bond_changelink()
527 err = __bond_opt_set(bond, BOND_OPT_AD_ACTOR_SYSTEM, &newval, in bond_changelink()
536 err = __bond_opt_set(bond, BOND_OPT_TLB_DYNAMIC_LB, &newval, in bond_changelink()
546 err = __bond_opt_set(bond, BOND_OPT_MISSED_MAX, &newval, in bond_changelink()
567 struct bonding *bond = netdev_priv(bond_dev); in bond_newlink() local
570 bond_work_init_all(bond); in bond_newlink()
621 static int bond_option_active_slave_get_ifindex(struct bonding *bond) in bond_option_active_slave_get_ifindex() argument
627 slave = bond_option_active_slave_get_rcu(bond); in bond_option_active_slave_get_ifindex()
636 struct bonding *bond = netdev_priv(bond_dev); in bond_fill_info() local
642 if (nla_put_u8(skb, IFLA_BOND_MODE, BOND_MODE(bond))) in bond_fill_info()
645 ifindex = bond_option_active_slave_get_ifindex(bond); in bond_fill_info()
649 if (nla_put_u32(skb, IFLA_BOND_MIIMON, bond->params.miimon)) in bond_fill_info()
653 bond->params.updelay * bond->params.miimon)) in bond_fill_info()
657 bond->params.downdelay * bond->params.miimon)) in bond_fill_info()
661 bond->params.peer_notif_delay * bond->params.miimon)) in bond_fill_info()
664 if (nla_put_u8(skb, IFLA_BOND_USE_CARRIER, bond->params.use_carrier)) in bond_fill_info()
667 if (nla_put_u32(skb, IFLA_BOND_ARP_INTERVAL, bond->params.arp_interval)) in bond_fill_info()
676 if (bond->params.arp_targets[i]) { in bond_fill_info()
677 if (nla_put_be32(skb, i, bond->params.arp_targets[i])) in bond_fill_info()
688 if (nla_put_u32(skb, IFLA_BOND_ARP_VALIDATE, bond->params.arp_validate)) in bond_fill_info()
692 bond->params.arp_all_targets)) in bond_fill_info()
702 if (!ipv6_addr_any(&bond->params.ns_targets[i])) { in bond_fill_info()
703 if (nla_put_in6_addr(skb, i, &bond->params.ns_targets[i])) in bond_fill_info()
715 primary = rtnl_dereference(bond->primary_slave); in bond_fill_info()
721 bond->params.primary_reselect)) in bond_fill_info()
725 bond->params.fail_over_mac)) in bond_fill_info()
729 bond->params.xmit_policy)) in bond_fill_info()
733 bond->params.resend_igmp)) in bond_fill_info()
737 bond->params.num_peer_notif)) in bond_fill_info()
741 bond->params.all_slaves_active)) in bond_fill_info()
745 bond->params.min_links)) in bond_fill_info()
749 bond->params.lp_interval)) in bond_fill_info()
752 packets_per_slave = bond->params.packets_per_slave; in bond_fill_info()
758 bond->params.lacp_active)) in bond_fill_info()
762 bond->params.lacp_fast)) in bond_fill_info()
766 bond->params.ad_select)) in bond_fill_info()
770 bond->params.tlb_dynamic_lb)) in bond_fill_info()
774 bond->params.missed_max)) in bond_fill_info()
777 if (BOND_MODE(bond) == BOND_MODE_8023AD) { in bond_fill_info()
782 bond->params.ad_actor_sys_prio)) in bond_fill_info()
786 bond->params.ad_user_port_key)) in bond_fill_info()
790 ETH_ALEN, &bond->params.ad_actor_system)) in bond_fill_info()
793 if (!bond_3ad_get_active_agg_info(bond, &info)) { in bond_fill_info()
847 struct bonding *bond; in bond_fill_linkxstats() local
851 bond = netdev_priv(dev); in bond_fill_linkxstats()
857 bond = slave->bond; in bond_fill_linkxstats()
866 if (BOND_MODE(bond) == BOND_MODE_8023AD) { in bond_fill_linkxstats()
872 stats = &BOND_AD_INFO(bond).stats; in bond_fill_linkxstats()
893 .kind = "bond",
925 MODULE_ALIAS_RTNL_LINK("bond");