summaryrefslogtreecommitdiff
path: root/drivers/net/bonding/bond_options.c
diff options
context:
space:
mode:
authorsfeldma@cumulusnetworks.com <sfeldma@cumulusnetworks.com>2013-12-15 16:42:12 -0800
committerDavid S. Miller <davem@davemloft.net>2013-12-17 16:08:45 -0500
commitf70161c67231f54f784529d7447ce4386d258b7a (patch)
tree62fa462795924d403b6fb03f8d3fccd54afd5162 /drivers/net/bonding/bond_options.c
parent89901972de4c00e74e56529804493734d77ee3d3 (diff)
bonding: add xmit_hash_policy attribute netlink support
Add IFLA_BOND_XMIT_HASH_POLICY to allow get/set of bonding parameter xmit_hash_policy via netlink. Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_options.c')
-rw-r--r--drivers/net/bonding/bond_options.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c
index 86f462008932..8510c6df115b 100644
--- a/drivers/net/bonding/bond_options.c
+++ b/drivers/net/bonding/bond_options.c
@@ -551,3 +551,13 @@ int bond_option_fail_over_mac_set(struct bonding *bond, int fail_over_mac)
return 0;
}
+
+int bond_option_xmit_hash_policy_set(struct bonding *bond, int xmit_hash_policy)
+{
+ bond->params.xmit_policy = xmit_hash_policy;
+ pr_info("%s: setting xmit hash policy to %s (%d).\n",
+ bond->dev->name,
+ xmit_hashtype_tbl[xmit_hash_policy].modename, xmit_hash_policy);
+
+ return 0;
+}