[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <loom.20131029T194706-188@post.gmane.org>
Date: Tue, 29 Oct 2013 19:00:20 +0000 (UTC)
From: Scott Feldman <sfeldma@...ulusnetworks.com>
To: netdev@...r.kernel.org
Subject: Re: [patch iproute2] iplink: add support for bonding netlink
Jiri Pirko <jiri <at> resnulli.us> writes:
> + } else if (matches(*argv, "active_slave") == 0) {
> + NEXT_ARG();
> + ifindex = if_nametoindex(*argv);
> + if (!ifindex)
> + return -1;
> + addattr32(n, 1024, IFLA_BOND_ACTIVE_SLAVE, ifindex);
> + } else if (matches(*argv, "clear_active_slave") == 0) {
> + addattr32(n, 1024, IFLA_BOND_ACTIVE_SLAVE, 0);
How do active_slave and clear_active_slave work from the ip link cmd line
when bond is added, but doesn't have any slaves yet? I did:
ip link add bond1 type bond mode 1
ip link set dev eth1 master bond1
ip link set dev eth2 master bond1
Then tried:
ip link add bond1 type bond active_slave eth1
RTNETLINK answers: File exists
Or:
ip link set dev bond1 active_slave eth1
Error: either "dev" is duplicate, or "active_slave" is a garbage.
I must be dense but I can't figure how you can set active_slave before
slaves have been added to bond, or even after slaves have been added
to bond.
> diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in
> index 8b68c78..1825dc5 100644
> --- a/man/man8/ip-link.8.in
> +++ b/man/man8/ip-link.8.in
> <at> <at> -51,6 +51,7 <at> <at> ip-link \- network device configuration
> .ti -8
> .IR TYPE " := [ "
> .BR bridge " | "
> +.BR bond " ]"
That should be " | "?
With patch applied, the man page shows:
TYPE := [ bridge | bond ] can | dummy | ifb | ipoib | macvlan | ...
-scott
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists