|
|
4aca6e |
From 42636a2ce4901df806543e994fa6cffc6992656f Mon Sep 17 00:00:00 2001
|
|
|
4aca6e |
From: Phil Sutter <psutter@redhat.com>
|
|
|
4aca6e |
Date: Tue, 28 Feb 2017 16:12:01 +0100
|
|
|
4aca6e |
Subject: [PATCH] iplink: bridge: add support for IFLA_BR_MCAST_HASH_ELASTICITY
|
|
|
4aca6e |
|
|
|
4aca6e |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1417289
|
|
|
4aca6e |
Upstream Status: iproute2.git commit 92c0ef7071b38
|
|
|
4aca6e |
|
|
|
4aca6e |
commit 92c0ef7071b3895ea89f26b7b7b6a77141e43578
|
|
|
4aca6e |
Author: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
|
|
|
4aca6e |
Date: Tue Feb 9 00:14:29 2016 +0100
|
|
|
4aca6e |
|
|
|
4aca6e |
iplink: bridge: add support for IFLA_BR_MCAST_HASH_ELASTICITY
|
|
|
4aca6e |
|
|
|
4aca6e |
This patch implements support for the IFLA_BR_MCAST_HASH_ELASTICTITY
|
|
|
4aca6e |
attribute in iproute2 so it can change the hash elasticity value.
|
|
|
4aca6e |
|
|
|
4aca6e |
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
|
|
|
4aca6e |
---
|
|
|
4aca6e |
ip/iplink_bridge.c | 15 +++++++++++++++
|
|
|
4aca6e |
1 file changed, 15 insertions(+)
|
|
|
4aca6e |
|
|
|
4aca6e |
diff --git a/ip/iplink_bridge.c b/ip/iplink_bridge.c
|
|
|
4aca6e |
index 620a9f9..3e444d3 100644
|
|
|
4aca6e |
--- a/ip/iplink_bridge.c
|
|
|
4aca6e |
+++ b/ip/iplink_bridge.c
|
|
|
4aca6e |
@@ -37,6 +37,7 @@ static void print_explain(FILE *f)
|
|
|
4aca6e |
" [ mcast_router MULTICAST_ROUTER ]\n"
|
|
|
4aca6e |
" [ mcast_query_use_ifaddr MCAST_QUERY_USE_IFADDR ]\n"
|
|
|
4aca6e |
" [ mcast_querier MULTICAST_QUERIER ]\n"
|
|
|
4aca6e |
+ " [ mcast_hash_elasticity HASH_ELASTICITY ]\n"
|
|
|
4aca6e |
"\n"
|
|
|
4aca6e |
"Where: VLAN_PROTOCOL := { 802.1Q | 802.1ad }\n"
|
|
|
4aca6e |
);
|
|
|
4aca6e |
@@ -184,6 +185,16 @@ static int bridge_parse_opt(struct link_util *lu, int argc, char **argv,
|
|
|
4aca6e |
invarg("invalid mcast_querier", *argv);
|
|
|
4aca6e |
|
|
|
4aca6e |
addattr8(n, 1024, IFLA_BR_MCAST_QUERIER, mcast_querier);
|
|
|
4aca6e |
+ } else if (matches(*argv, "mcast_hash_elasticity") == 0) {
|
|
|
4aca6e |
+ __u32 mcast_hash_el;
|
|
|
4aca6e |
+
|
|
|
4aca6e |
+ NEXT_ARG();
|
|
|
4aca6e |
+ if (get_u32(&mcast_hash_el, *argv, 0))
|
|
|
4aca6e |
+ invarg("invalid mcast_hash_elasticity",
|
|
|
4aca6e |
+ *argv);
|
|
|
4aca6e |
+
|
|
|
4aca6e |
+ addattr32(n, 1024, IFLA_BR_MCAST_HASH_ELASTICITY,
|
|
|
4aca6e |
+ mcast_hash_el);
|
|
|
4aca6e |
} else if (matches(*argv, "help") == 0) {
|
|
|
4aca6e |
explain();
|
|
|
4aca6e |
return -1;
|
|
|
4aca6e |
@@ -337,6 +348,10 @@ static void bridge_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
|
|
|
4aca6e |
if (tb[IFLA_BR_MCAST_QUERIER])
|
|
|
4aca6e |
fprintf(f, "mcast_querier %u ",
|
|
|
4aca6e |
rta_getattr_u8(tb[IFLA_BR_MCAST_QUERIER]));
|
|
|
4aca6e |
+
|
|
|
4aca6e |
+ if (tb[IFLA_BR_MCAST_HASH_ELASTICITY])
|
|
|
4aca6e |
+ fprintf(f, "mcast_hash_elasticity %u ",
|
|
|
4aca6e |
+ rta_getattr_u32(tb[IFLA_BR_MCAST_HASH_ELASTICITY]));
|
|
|
4aca6e |
}
|
|
|
4aca6e |
|
|
|
4aca6e |
static void bridge_print_help(struct link_util *lu, int argc, char **argv,
|
|
|
4aca6e |
--
|
|
|
4aca6e |
1.8.3.1
|
|
|
4aca6e |
|