From: "Nicolas de Pesloüan" <nicolas.2p.debian@free.fr>
To: Stephen Hemminger <shemminger@vyatta.com>,
Jay Vosburgh <fubar@us.ibm.com>,
bonding-devel@lists.sourceforge.net, netdev@vger.kernel.org
Cc: Jiri Pirko <jpirko@redhat.com>
Subject: Re: Netlink API for bonding ?
Date: Thu, 17 Sep 2009 23:44:30 +0200 [thread overview]
Message-ID: <4AB2ADBE.1060402@free.fr> (raw)
In-Reply-To: <20090831150000.4bcd1481@nehalam>
Stephen Hemminger wrote:
> On Mon, 31 Aug 2009 22:34:50 +0200
> Nicolas de Pesloüan <nicolas.2p.debian@free.fr> wrote:
>
>> Stephen,
>>
>> Can you please describe the netlink API you plan to implement for bonding ?
>>
>> Both Jiri Pirko and I plan to add some advanced active slave selection rules,
>> for more-than-two-slaves bonding configuration.
>>
>> Jay suggested that such advanced features be implemented in user space, using
>> netlink to notify a daemon when slaves come up or fall down. I agree with Jay,
>> but don't want to design something without having first a view at your proposed
>> API for bonding.
>>
>> Do you plan to have some notification to user space, or only the ability to read
>> and set bonding configuration using netlink ?
>>
>> Thanks,
>>
>> Nicolas.
>
> No paper spec, but was looking to add interface similar to vlan and macvlan.
> Just use (and extend if needed) existing rtnl_link_ops.
>
>
> Was not planning on adding a notification interface, thats good idea but
> really not what I was looking at.
What kind of notification system would you suggest to notify userland that a
given bond device just lose the current active slave ?
1/ Adding to the list of broadcast group (RTMGRP_*) for NETLINK_ROUTE protocol
in include/linux/rtnetlink.h.
2/ Registering a new NETLINK protocol NETLINK_BONDING in include/linux/netlink.h
and one of more broadcast groups for this new protocol ?
3/ Not using a broadcast group for notification, but expecting userland to
register with the driver using a rtnl_link_ops attribut, to give its PID, so the
driver can then send unicast netlink message to userland which would bind() on
NETLINK_ROUTE ?
4/ Using NETLINK_GENERIC in some ways ?
Also, we need a way to ensure that userland is still available to decide
quickly what to do when the active slave disappear. At least some sort of
timeout, that, when elapsed, would cause bonding driver to fall back to the
normal behavior.
Should the notification message hold all the available information about the
current status of the bonding device, so that userland is able to decide
quickly, without asking the driver to provide extra information ? This would
require the receiving buffer to be very large, and with a variable length,
because the status length depends on the number of slaves for this particular
bonding device. Not really nice...
Another way would be to simply notify userland that "something happens to bond
device bondX", and expect userland to ask for the information, by first asking
for the buffer size, then asking to fill the buffer. This would lead to some
extra process time, that might be too long to be acceptable to select a new
active slave.
Any comments ?
Nicolas.
next parent reply other threads:[~2009-09-17 21:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4A9C33EA.7080008@free.fr>
[not found] ` <20090831150000.4bcd1481@nehalam>
2009-09-17 21:44 ` Nicolas de Pesloüan [this message]
2009-09-17 21:51 ` Netlink API for bonding ? Stephen Hemminger
2009-09-17 22:10 ` Nicolas de Pesloüan
2009-09-18 4:00 ` Stephen Hemminger
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=4AB2ADBE.1060402@free.fr \
--to=nicolas.2p.debian@free.fr \
--cc=bonding-devel@lists.sourceforge.net \
--cc=fubar@us.ibm.com \
--cc=jpirko@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.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 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).