All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vlad Yasevich <vyasevic@redhat.com>
To: Scott Feldman <sfeldma@cumulusnetworks.com>, netdev@vger.kernel.org
Subject: Re: [patch iproute2] iplink: add support for bonding netlink
Date: Tue, 29 Oct 2013 16:12:32 -0400	[thread overview]
Message-ID: <527016B0.5060600@redhat.com> (raw)
In-Reply-To: <loom.20131029T194706-188@post.gmane.org>

On 10/29/2013 03:00 PM, Scott Feldman wrote:
> 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.

You need to do:
	ip link set dev bond1 type bond active_slave eth1

'active_slave' argument is only defined for the 'type bond' operations.

You can not set active slave before enslaving the device and this
series doesn't change that.

-vlad

>
> 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@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

  reply	other threads:[~2013-10-29 20:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-18 15:43 [patch net-next 0/7] bonding: introduce bonding options Netlink support Jiri Pirko
2013-10-18 15:43 ` [patch net-next 1/7] bonding: push Netlink bits into separate file Jiri Pirko
2013-10-18 15:43 ` [patch net-next 2/7] bonding: move mode setting into separate function Jiri Pirko
2013-10-18 15:43 ` [patch net-next 3/7] bonding: move active_slave " Jiri Pirko
2013-10-18 15:43 ` [patch net-next 4/7] bonding: remove bond_ioctl_change_active() Jiri Pirko
2013-10-18 15:43 ` [patch net-next 5/7] bonding: move active_slave getting into separate function Jiri Pirko
2013-10-18 15:43 ` [patch net-next 6/7] bonding: add Netlink support mode option Jiri Pirko
2013-10-18 15:43 ` [patch net-next 7/7] bonding: add Netlink support active_slave option Jiri Pirko
2013-10-18 15:50 ` [patch iproute2] iplink: add support for bonding netlink Jiri Pirko
2013-10-29 19:00   ` Scott Feldman
2013-10-29 20:12     ` Vlad Yasevich [this message]
2013-10-30 23:46   ` Stephen Hemminger
2013-10-19 22:59 ` [patch net-next 0/7] bonding: introduce bonding options Netlink support David Miller

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=527016B0.5060600@redhat.com \
    --to=vyasevic@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=sfeldma@cumulusnetworks.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.