Revert "bonding: add broadcast_arp param to send arp broadcast"

This reverts commit e802647ff1.
This commit is contained in:
Hongbo Li 2024-04-08 19:47:31 +08:00
parent 5862687a8d
commit 56e8a03a04
3 changed files with 0 additions and 48 deletions

View File

@ -5168,8 +5168,6 @@ static struct slave *bond_xdp_xmit_3ad_xor_slave_get(struct bonding *bond,
return slaves->arr[hash % count];
}
static netdev_tx_t bond_xmit_broadcast(struct sk_buff *skb,
struct net_device *bond_dev);
/* Use this Xmit function for 3AD as well as XOR modes. The current
* usable slave array is formed in the control path. The xmit function
* just calculates hash and sends the packet out.
@ -5181,10 +5179,6 @@ static netdev_tx_t bond_3ad_xor_xmit(struct sk_buff *skb,
struct bond_up_slave *slaves;
struct slave *slave;
/* Broadcast arp to all slaves. */
if (bond->params.broadcast_arp && ntohs(skb->protocol) == ETH_P_ARP)
return bond_xmit_broadcast(skb, dev);
slaves = rcu_dereference(bond->usable_slaves);
slave = bond_xmit_3ad_xor_slave_get(bond, skb, slaves);
if (likely(slave))

View File

@ -753,46 +753,6 @@ static ssize_t bonding_show_ad_user_port_key(struct device *d,
static DEVICE_ATTR(ad_user_port_key, 0644,
bonding_show_ad_user_port_key, bonding_sysfs_store_option);
static ssize_t bonding_show_broadcast_arp(struct device *d,
struct device_attribute *attr, char *buf)
{
struct bonding *bond = to_bond(d);
return sprintf(buf, "%d\n", bond->params.broadcast_arp);
}
static ssize_t bonding_store_broadcast_arp(struct device *d,
struct device_attribute *attr,
const char *buf, size_t count)
{
int new_value, ret = count;
struct bonding *bond = to_bond(d);
if (sscanf(buf, "%d", &new_value) != 1) {
pr_err("%s: no broadcast arp value specified.\n",
bond->dev->name);
ret = -EINVAL;
goto out;
}
if (new_value != 0 && new_value != 1) {
pr_err("%s: Invalid broadcast arp value %d not in range 0-1; rejected.\n",
bond->dev->name, new_value);
ret = -EINVAL;
goto out;
}
pr_info("%s: Setting broadcast arp to %d.\n",
bond->dev->name, new_value);
bond->params.broadcast_arp = new_value;
out:
return ret;
}
static DEVICE_ATTR(broadcast_arp, S_IRUGO | S_IWUSR,
bonding_show_broadcast_arp, bonding_store_broadcast_arp);
static struct attribute *per_bond_attrs[] = {
&dev_attr_slaves.attr,
&dev_attr_mode.attr,
@ -832,7 +792,6 @@ static struct attribute *per_bond_attrs[] = {
&dev_attr_ad_actor_system.attr,
&dev_attr_ad_user_port_key.attr,
&dev_attr_arp_missed_max.attr,
&dev_attr_broadcast_arp.attr,
NULL,
};

View File

@ -148,7 +148,6 @@ struct bond_params {
#if IS_ENABLED(CONFIG_IPV6)
struct in6_addr ns_targets[BOND_MAX_NS_TARGETS];
#endif
int broadcast_arp;
/* 2 bytes of padding : see ether_addr_equal_64bits() */
u8 ad_actor_system[ETH_ALEN + 2];