From: Nikolay Aleksandrov <razor@blackwall.org>
To: netdev@vger.kernel.org
Cc: roopa@cumulusnetworks.com, stephen@networkplumber.org,
Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Subject: [PATCH iproute2 v2 11/21] iplink: bridge: add support for IFLA_BR_MCAST_HASH_ELASTICITY
Date: Tue, 9 Feb 2016 00:14:29 +0100 [thread overview]
Message-ID: <1454973279-9170-12-git-send-email-razor@blackwall.org> (raw)
In-Reply-To: <1454973279-9170-1-git-send-email-razor@blackwall.org>
From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
This patch implements support for the IFLA_BR_MCAST_HASH_ELASTICTITY
attribute in iproute2 so it can change the hash elasticity value.
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
---
ip/iplink_bridge.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/ip/iplink_bridge.c b/ip/iplink_bridge.c
index fbea0a38fd41..93dcc982c623 100644
--- a/ip/iplink_bridge.c
+++ b/ip/iplink_bridge.c
@@ -37,6 +37,7 @@ static void print_explain(FILE *f)
" [ mcast_router MULTICAST_ROUTER ]\n"
" [ mcast_query_use_ifaddr MCAST_QUERY_USE_IFADDR ]\n"
" [ mcast_querier MULTICAST_QUERIER ]\n"
+ " [ mcast_hash_elasticity HASH_ELASTICITY ]\n"
"\n"
"Where: VLAN_PROTOCOL := { 802.1Q | 802.1ad }\n"
);
@@ -178,6 +179,16 @@ static int bridge_parse_opt(struct link_util *lu, int argc, char **argv,
invarg("invalid mcast_querier", *argv);
addattr8(n, 1024, IFLA_BR_MCAST_QUERIER, mcast_querier);
+ } else if (matches(*argv, "mcast_hash_elasticity") == 0) {
+ __u32 mcast_hash_el;
+
+ NEXT_ARG();
+ if (get_u32(&mcast_hash_el, *argv, 0))
+ invarg("invalid mcast_hash_elasticity",
+ *argv);
+
+ addattr32(n, 1024, IFLA_BR_MCAST_HASH_ELASTICITY,
+ mcast_hash_el);
} else if (matches(*argv, "help") == 0) {
explain();
return -1;
@@ -331,6 +342,10 @@ static void bridge_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
if (tb[IFLA_BR_MCAST_QUERIER])
fprintf(f, "mcast_querier %u ",
rta_getattr_u8(tb[IFLA_BR_MCAST_QUERIER]));
+
+ if (tb[IFLA_BR_MCAST_HASH_ELASTICITY])
+ fprintf(f, "mcast_hash_elasticity %u ",
+ rta_getattr_u32(tb[IFLA_BR_MCAST_HASH_ELASTICITY]));
}
static void bridge_print_help(struct link_util *lu, int argc, char **argv,
--
2.4.3
next prev parent reply other threads:[~2016-02-08 23:14 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-08 23:14 [PATCH iproute2 v2 00/21] bridge: complete netlink support Nikolay Aleksandrov
2016-02-08 23:14 ` [PATCH iproute2 v2 01/21] iplink: bridge: export bridge_id and designated_root Nikolay Aleksandrov
2016-02-09 17:25 ` Stephen Hemminger
2016-02-08 23:14 ` [PATCH iproute2 v2 02/21] iplink: bridge: export root_(port|path_cost), topology_change and change_detected Nikolay Aleksandrov
2016-02-08 23:14 ` [PATCH iproute2 v2 03/21] iplink: bridge: export read-only timers Nikolay Aleksandrov
2016-02-08 23:14 ` [PATCH iproute2 v2 04/21] iplink: bridge: add support for IFLA_BR_GROUP_FWD_MASK Nikolay Aleksandrov
2016-02-08 23:14 ` [PATCH iproute2 v2 05/21] iplink: bridge: add support for IFLA_BR_GROUP_ADDR Nikolay Aleksandrov
2016-02-08 23:14 ` [PATCH iproute2 v2 06/21] iplink: bridge: add support for IFLA_BR_VLAN_DEFAULT_PVID Nikolay Aleksandrov
2016-02-08 23:14 ` [PATCH iproute2 v2 07/21] iplink: bridge: add support for IFLA_BR_MCAST_ROUTER Nikolay Aleksandrov
2016-02-08 23:14 ` [PATCH iproute2 v2 08/21] iplink: bridge: add support for IFLA_BR_MCAST_SNOOPING Nikolay Aleksandrov
2016-02-08 23:14 ` [PATCH iproute2 v2 09/21] iplink: bridge: add support for IFLA_BR_MCAST_QUERY_USE_IFADDR Nikolay Aleksandrov
2016-02-08 23:14 ` [PATCH iproute2 v2 10/21] iplink: bridge: add support for IFLA_BR_MCAST_QUERIER Nikolay Aleksandrov
2016-02-08 23:14 ` Nikolay Aleksandrov [this message]
2016-02-08 23:14 ` [PATCH iproute2 v2 12/21] iplink: bridge: add support for IFLA_BR_MCAST_HASH_MAX Nikolay Aleksandrov
2016-02-08 23:14 ` [PATCH iproute2 v2 13/21] iplink: bridge: add support for IFLA_BR_MCAST_LAST_MEMBER_CNT Nikolay Aleksandrov
2016-02-08 23:14 ` [PATCH iproute2 v2 14/21] iplink: bridge: add support for IFLA_BR_MCAST_STARTUP_QUERY_CNT Nikolay Aleksandrov
2016-02-08 23:14 ` [PATCH iproute2 v2 15/21] iplink: bridge: add support for IFLA_BR_MCAST_LAST_MEMBER_INTVL Nikolay Aleksandrov
2016-02-08 23:14 ` [PATCH iproute2 v2 16/21] iplink: bridge: add support for IFLA_BR_MCAST_MEMBERSHIP_INTVL Nikolay Aleksandrov
2016-02-08 23:14 ` [PATCH iproute2 v2 17/21] iplink: bridge: add support for IFLA_BR_MCAST_QUERIER_INTVL Nikolay Aleksandrov
2016-02-08 23:14 ` [PATCH iproute2 v2 18/21] iplink: bridge: add support for IFLA_BR_MCAST_QUERY_INTVL Nikolay Aleksandrov
2016-02-08 23:14 ` [PATCH iproute2 v2 19/21] iplink: bridge: add support for IFLA_BR_MCAST_QUERY_RESPONSE_INTVL Nikolay Aleksandrov
2016-02-08 23:14 ` [PATCH iproute2 v2 20/21] iplink: bridge: add support for IFLA_BR_MCAST_STARTUP_QUERY_INTVL Nikolay Aleksandrov
2016-02-08 23:14 ` [PATCH iproute2 v2 21/21] iplink: bridge: add support for netfilter call attributes Nikolay Aleksandrov
2016-02-09 12:00 ` Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1454973279-9170-12-git-send-email-razor@blackwall.org \
--to=razor@blackwall.org \
--cc=netdev@vger.kernel.org \
--cc=nikolay@cumulusnetworks.com \
--cc=roopa@cumulusnetworks.com \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).