#include <linux/errno.h>
#include <linux/if.h>
#include <linux/netdevice.h>
#include <linux/spinlock.h>
#include <linux/rcupdate.h>
#include <linux/ctype.h>
#include <linux/inet.h>
#include <linux/sched/signal.h>
#include <net/bonding.h>
static int bond_option_active_slave_set(struct bonding *bond,
const struct bond_opt_value *newval);
static int bond_option_miimon_set(struct bonding *bond,
const struct bond_opt_value *newval);
static int bond_option_updelay_set(struct bonding *bond,
const struct bond_opt_value *newval);
static int bond_option_downdelay_set(struct bonding *bond,
const struct bond_opt_value *newval);
static int bond_option_peer_notif_delay_set(struct bonding *bond,
const struct bond_opt_value *newval);
static int bond_option_use_carrier_set(struct bonding *bond,
const struct bond_opt_value *newval);
static int bond_option_arp_interval_set(struct bonding *bond,
const struct bond_opt_value *newval);
static int bond_option_arp_ip_target_add(struct bonding *bond, __be32 target);
static int bond_option_arp_ip_target_rem(struct bonding *bond, __be32 target);
static int bond_option_arp_ip_targets_set(struct bonding *bond,
const struct bond_opt_value *newval);
static int bond_option_ns_ip6_targets_set(struct bonding *bond,
const struct bond_opt_value *newval);
static int bond_option_arp_validate_set(struct bonding *bond,
const struct bond_opt_value *newval);
static int bond_option_arp_all_targets_set(struct bonding *bond,
const struct bond_opt_value *newval);
static int bond_option_prio_set(struct bonding *bond,
const struct bond_opt_value *newval);
static int bond_option_primary_set(struct bonding *bond,
const struct bond_opt_value *newval);
static int bond_option_primary_reselect_set(struct bonding *bond,
const struct bond_opt_value *newval);
static int bond_option_fail_over_mac_set(struct bonding *bond,
const struct bond_opt_value *newval);
static int bond_option_xmit_hash_policy_set(struct bonding *bond,
const struct bond_opt_value *newval);
static int bond_option_resend_igmp_set(struct bonding *bond,
const struct bond_opt_value *newval);
static int bond_option_num_peer_notif_set(struct bonding *bond,
const struct bond_opt_value *newval);
static int bond_option_all_slaves_active_set(struct bonding *bond,
const struct bond_opt_value *newval);
static int bond_option_min_links_set(struct bonding *bond,
const struct bond_opt_value *newval);
static int bond_option_lp_interval_set(struct bonding *bond,
const struct bond_opt_value *newval);
static int bond_option_pps_set(struct bonding *bond,
const struct bond_opt_value *newval);
static int bond_option_lacp_active_set(struct bonding *bond,
const struct bond_opt_value *newval);
static int bond_option_lacp_rate_set(struct bonding *bond,
const struct bond_opt_value *newval);
static int bond_option_ad_select_set(struct bonding *bond,
const struct bond_opt_value *newval);
static int bond_option_queue_id_set(struct bonding *bond,
const struct bond_opt_value *newval);
static int bond_option_mode_set(struct bonding *bond,
const struct bond_opt_value *newval);
static int bond_option_slaves_set(struct bonding *bond,
const struct bond_opt_value *newval);
static int bond_option_tlb_dynamic_lb_set(struct bonding *bond,
const struct bond_opt_value *newval);
static int bond_option_ad_actor_sys_prio_set(struct bonding *bond,
const struct bond_opt_value *newval);
static int bond_option_ad_actor_system_set(struct bonding *bond,
const struct bond_opt_value *newval);
static int bond_option_ad_user_port_key_set(struct bonding *bond,
const struct bond_opt_value *newval);
static int bond_option_missed_max_set(struct bonding *bond,
const struct bond_opt_value *newval);
static int bond_option_coupled_control_set(struct bonding *bond,
const struct bond_opt_value *newval);
static const struct bond_opt_value bond_mode_tbl[] = …;
static const struct bond_opt_value bond_pps_tbl[] = …;
static const struct bond_opt_value bond_xmit_hashtype_tbl[] = …;
static const struct bond_opt_value bond_arp_validate_tbl[] = …;
static const struct bond_opt_value bond_arp_all_targets_tbl[] = …;
static const struct bond_opt_value bond_fail_over_mac_tbl[] = …;
static const struct bond_opt_value bond_intmax_tbl[] = …;
static const struct bond_opt_value bond_lacp_active[] = …;
static const struct bond_opt_value bond_lacp_rate_tbl[] = …;
static const struct bond_opt_value bond_ad_select_tbl[] = …;
static const struct bond_opt_value bond_num_peer_notif_tbl[] = …;
static const struct bond_opt_value bond_peer_notif_delay_tbl[] = …;
static const struct bond_opt_value bond_primary_reselect_tbl[] = …;
static const struct bond_opt_value bond_use_carrier_tbl[] = …;
static const struct bond_opt_value bond_all_slaves_active_tbl[] = …;
static const struct bond_opt_value bond_resend_igmp_tbl[] = …;
static const struct bond_opt_value bond_lp_interval_tbl[] = …;
static const struct bond_opt_value bond_tlb_dynamic_lb_tbl[] = …;
static const struct bond_opt_value bond_ad_actor_sys_prio_tbl[] = …;
static const struct bond_opt_value bond_ad_user_port_key_tbl[] = …;
static const struct bond_opt_value bond_missed_max_tbl[] = …;
static const struct bond_opt_value bond_coupled_control_tbl[] = …;
static const struct bond_option bond_opts[BOND_OPT_LAST] = …;
const struct bond_option *bond_opt_get_by_name(const char *name)
{ … }
const struct bond_opt_value *bond_opt_get_val(unsigned int option, u64 val)
{ … }
static const struct bond_opt_value *bond_opt_get_flags(const struct bond_option *opt,
u32 flagmask)
{ … }
static bool bond_opt_check_range(const struct bond_option *opt, u64 val)
{ … }
const struct bond_opt_value *bond_opt_parse(const struct bond_option *opt,
struct bond_opt_value *val)
{ … }
static int bond_opt_check_deps(struct bonding *bond,
const struct bond_option *opt)
{ … }
static void bond_opt_dep_print(struct bonding *bond,
const struct bond_option *opt,
struct nlattr *bad_attr,
struct netlink_ext_ack *extack)
{ … }
static void bond_opt_error_interpret(struct bonding *bond,
const struct bond_option *opt,
int error, const struct bond_opt_value *val,
struct nlattr *bad_attr,
struct netlink_ext_ack *extack)
{ … }
int __bond_opt_set(struct bonding *bond,
unsigned int option, struct bond_opt_value *val,
struct nlattr *bad_attr, struct netlink_ext_ack *extack)
{ … }
int __bond_opt_set_notify(struct bonding *bond,
unsigned int option, struct bond_opt_value *val)
{ … }
int bond_opt_tryset_rtnl(struct bonding *bond, unsigned int option, char *buf)
{ … }
const struct bond_option *bond_opt_get(unsigned int option)
{ … }
static bool bond_set_xfrm_features(struct bonding *bond)
{ … }
static int bond_option_mode_set(struct bonding *bond,
const struct bond_opt_value *newval)
{ … }
static int bond_option_active_slave_set(struct bonding *bond,
const struct bond_opt_value *newval)
{ … }
static int bond_option_miimon_set(struct bonding *bond,
const struct bond_opt_value *newval)
{ … }
static int _bond_option_delay_set(struct bonding *bond,
const struct bond_opt_value *newval,
const char *name,
int *target)
{ … }
static int bond_option_updelay_set(struct bonding *bond,
const struct bond_opt_value *newval)
{ … }
static int bond_option_downdelay_set(struct bonding *bond,
const struct bond_opt_value *newval)
{ … }
static int bond_option_peer_notif_delay_set(struct bonding *bond,
const struct bond_opt_value *newval)
{ … }
static int bond_option_use_carrier_set(struct bonding *bond,
const struct bond_opt_value *newval)
{ … }
static int bond_option_arp_interval_set(struct bonding *bond,
const struct bond_opt_value *newval)
{ … }
static void _bond_options_arp_ip_target_set(struct bonding *bond, int slot,
__be32 target,
unsigned long last_rx)
{ … }
static int _bond_option_arp_ip_target_add(struct bonding *bond, __be32 target)
{ … }
static int bond_option_arp_ip_target_add(struct bonding *bond, __be32 target)
{ … }
static int bond_option_arp_ip_target_rem(struct bonding *bond, __be32 target)
{ … }
void bond_option_arp_ip_targets_clear(struct bonding *bond)
{ … }
static int bond_option_arp_ip_targets_set(struct bonding *bond,
const struct bond_opt_value *newval)
{ … }
#if IS_ENABLED(CONFIG_IPV6)
static void _bond_options_ns_ip6_target_set(struct bonding *bond, int slot,
struct in6_addr *target,
unsigned long last_rx)
{ … }
void bond_option_ns_ip6_targets_clear(struct bonding *bond)
{ … }
static int bond_option_ns_ip6_targets_set(struct bonding *bond,
const struct bond_opt_value *newval)
{ … }
#else
static int bond_option_ns_ip6_targets_set(struct bonding *bond,
const struct bond_opt_value *newval)
{
return -EPERM;
}
#endif
static int bond_option_arp_validate_set(struct bonding *bond,
const struct bond_opt_value *newval)
{ … }
static int bond_option_arp_all_targets_set(struct bonding *bond,
const struct bond_opt_value *newval)
{ … }
static int bond_option_missed_max_set(struct bonding *bond,
const struct bond_opt_value *newval)
{ … }
static int bond_option_prio_set(struct bonding *bond,
const struct bond_opt_value *newval)
{ … }
static int bond_option_primary_set(struct bonding *bond,
const struct bond_opt_value *newval)
{ … }
static int bond_option_primary_reselect_set(struct bonding *bond,
const struct bond_opt_value *newval)
{ … }
static int bond_option_fail_over_mac_set(struct bonding *bond,
const struct bond_opt_value *newval)
{ … }
static int bond_option_xmit_hash_policy_set(struct bonding *bond,
const struct bond_opt_value *newval)
{ … }
static int bond_option_resend_igmp_set(struct bonding *bond,
const struct bond_opt_value *newval)
{ … }
static int bond_option_num_peer_notif_set(struct bonding *bond,
const struct bond_opt_value *newval)
{ … }
static int bond_option_all_slaves_active_set(struct bonding *bond,
const struct bond_opt_value *newval)
{ … }
static int bond_option_min_links_set(struct bonding *bond,
const struct bond_opt_value *newval)
{ … }
static int bond_option_lp_interval_set(struct bonding *bond,
const struct bond_opt_value *newval)
{ … }
static int bond_option_pps_set(struct bonding *bond,
const struct bond_opt_value *newval)
{ … }
static int bond_option_lacp_active_set(struct bonding *bond,
const struct bond_opt_value *newval)
{ … }
static int bond_option_lacp_rate_set(struct bonding *bond,
const struct bond_opt_value *newval)
{ … }
static int bond_option_ad_select_set(struct bonding *bond,
const struct bond_opt_value *newval)
{ … }
static int bond_option_queue_id_set(struct bonding *bond,
const struct bond_opt_value *newval)
{ … }
static int bond_option_slaves_set(struct bonding *bond,
const struct bond_opt_value *newval)
{ … }
static int bond_option_tlb_dynamic_lb_set(struct bonding *bond,
const struct bond_opt_value *newval)
{ … }
static int bond_option_ad_actor_sys_prio_set(struct bonding *bond,
const struct bond_opt_value *newval)
{ … }
static int bond_option_ad_actor_system_set(struct bonding *bond,
const struct bond_opt_value *newval)
{ … }
static int bond_option_ad_user_port_key_set(struct bonding *bond,
const struct bond_opt_value *newval)
{ … }
static int bond_option_coupled_control_set(struct bonding *bond,
const struct bond_opt_value *newval)
{ … }