From: Jiri Pirko <jpirko@redhat.com>
To: Patrick McHardy <kaber@trash.net>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
shemminger@linux-foundation.org, fubar@us.ibm.com
Subject: Re: [patch net-next-2.6 1/4] net: extend netlink interface to handle generic slave management
Date: Fri, 11 Feb 2011 18:40:43 +0100 [thread overview]
Message-ID: <20110211174042.GA2578@psychotron.redhat.com> (raw)
In-Reply-To: <4D555A43.5000005@trash.net>
Fri, Feb 11, 2011 at 04:48:19PM CET, kaber@trash.net wrote:
>On 11.02.2011 16:21, Jiri Pirko wrote:
>> Drivers like bridge and bonding uses their own way to manipulate with
>> underlink devices. This is an attempt to introduce common interface using
>> netlink.
>
>Thanks for working on this, this has been on my TODO list for a
>long time.
>
>> --- a/include/linux/if_link.h
>> +++ b/include/linux/if_link.h
>> @@ -136,6 +136,9 @@ enum {
>> IFLA_PORT_SELF,
>> IFLA_AF_SPEC,
>> IFLA_GROUP, /* Group the device belongs to */
>> + IFLA_SLAVE_LIST,
>> + IFLA_SLAVE_ADD,
>> + IFLA_SLAVE_DEL,
>
>I don't like this very much though, the attributes usually contain
>data, not commands. We already have NEWLINK, DELLINK etc. on the
>top level, the combinations of NEWLINK/NLM_F_CREAT and SLAVE_DEL
>or DELLINK and SLAVE_ADD and so on simply don't make sense.
>
>We usually also try to keep the interface symetrical in both
>directions (a NEWLINK message from the kernel is identical to a
>NEWLINK message from userspace, a DELLINK message as well besides
>containing additional information), so using different attributes
>for dumping slaves than for adding them seems wrong. If we can
>dump all slaves in one message, it should also be possible to
>enslave multiple devices using the same message.
>
>What I originally had planned to support enslaving devices is to
>make use of the IFLA_MASTER attribute. The IFLA_MASTER attribute
>would contain the bond or bridge ifindex and the IFLA_IFNAME
>attribute or ifindex would specify the slave device. All operations
>would be performed on the slave device as usual, if the IFLA_MASTER
>attribute is present we'd additionally call a master specific
>callback for enslaving or releasing slave devices. Besides allowing
>to keep messages symetrical, an additional benefit is that it would
>be possible to create and enslave a device in a single step.
>
Yes, that makes sense. I'm going to respin the patchset soon.
Jirka
>
prev parent reply other threads:[~2011-02-11 18:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-11 15:21 [patch net-next-2.6 1/4] net: extend netlink interface to handle generic slave management Jiri Pirko
2011-02-11 15:22 ` [patch iproute2 2/4] implement slave management operations Jiri Pirko
2011-02-11 15:27 ` Jiri Pirko
2011-02-11 15:22 ` [patch net-next-2.6 3/4] bond: " Jiri Pirko
2011-02-11 17:19 ` Jay Vosburgh
2011-02-11 17:51 ` Jiri Pirko
2011-02-12 13:16 ` Nicolas de Pesloüan
2011-02-12 13:20 ` Jiri Pirko
2011-02-11 15:23 ` [patch net-next-2.6 4/4] bridge: " Jiri Pirko
2011-02-28 22:17 ` Stephen Hemminger
2011-02-28 22:45 ` Stephen Hemminger
2011-03-01 6:19 ` Jiri Pirko
2011-02-11 15:48 ` [patch net-next-2.6 1/4] net: extend netlink interface to handle generic slave management Patrick McHardy
2011-02-11 17:40 ` Jiri Pirko [this message]
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=20110211174042.GA2578@psychotron.redhat.com \
--to=jpirko@redhat.com \
--cc=davem@davemloft.net \
--cc=fubar@us.ibm.com \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
--cc=shemminger@linux-foundation.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).