summaryrefslogtreecommitdiff
path: root/drivers/net/bonding/bond_sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bonding/bond_sysfs.c')
-rw-r--r--drivers/net/bonding/bond_sysfs.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index abf5e10..1e591c4 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -329,6 +329,9 @@ static ssize_t bonding_store_xmit_hash(struct device *d,
(int)strlen(buf) - 1, buf);
ret = -EINVAL;
} else {
+#ifdef CONFIG_HW_DISTRIBUTION_WITH_OH
+ apply_pcd(bond, new_value);
+#endif
bond->params.xmit_policy = new_value;
pr_info("%s: setting xmit hash policy to %s (%d).\n",
bond->dev->name,
@@ -883,6 +886,21 @@ static ssize_t bonding_store_min_links(struct device *d,
}
static DEVICE_ATTR(min_links, S_IRUGO | S_IWUSR,
bonding_show_min_links, bonding_store_min_links);
+#ifdef CONFIG_HW_DISTRIBUTION_WITH_OH
+static DEVICE_ATTR(offline_port_xmit_statistics, S_IRUGO,
+ bonding_show_offline_port_xmit_statistics, NULL);
+
+static DEVICE_ATTR(offline_ports, S_IRUGO,
+ bonding_show_offline_ports, NULL);
+
+static DEVICE_ATTR(oh_needed_for_hw_distribution, S_IRUGO | S_IWUSR,
+ bonding_show_oh_needed_for_hw_distribution,
+ bonding_store_oh_needed_for_hw_distribution);
+
+static DEVICE_ATTR(oh_en, S_IRUGO | S_IWUSR,
+ bonding_show_oh_enable,
+ bonding_store_oh_enable);
+#endif
static ssize_t bonding_show_ad_select(struct device *d,
struct device_attribute *attr,
@@ -1709,6 +1727,12 @@ static struct attribute *per_bond_attrs[] = {
&dev_attr_min_links.attr,
&dev_attr_lp_interval.attr,
&dev_attr_packets_per_slave.attr,
+#ifdef CONFIG_HW_DISTRIBUTION_WITH_OH
+ &dev_attr_offline_ports.attr,
+ &dev_attr_oh_needed_for_hw_distribution.attr,
+ &dev_attr_oh_en.attr,
+ &dev_attr_offline_port_xmit_statistics.attr,
+#endif
NULL,
};