[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <C5AA1F6D-4FC7-42F6-A59F-A0114E1B2E8B@cumulusnetworks.com>
Date: Tue, 21 Jan 2014 14:42:58 -0800
From: Scott Feldman <sfeldma@...ulusnetworks.com>
To: Jiri Pirko <jiri@...nulli.us>
Cc: Veaceslav Falico <vfalico@...hat.com>,
Jay Vosburgh <fubar@...ibm.com>,
Andy Gospodarek <andy@...yhouse.net>,
Netdev <netdev@...r.kernel.org>,
Roopa Prabhu <roopa@...ulusnetworks.com>,
Shrijeet Mukherjee <shm@...ulusnetworks.com>,
Ding Tianhong <dingtianhong@...wei.com>
Subject: Re: [PATCH net-next v2 2/2] bonding: add netlink attributes to slave link dev
On Jan 21, 2014, at 2:00 PM, Jiri Pirko <jiri@...nulli.us> wrote:
> Tue, Jan 21, 2014 at 10:36:58PM CET, sfeldma@...ulusnetworks.com wrote:
>>
>> On Jan 21, 2014, at 5:34 AM, Jiri Pirko <jiri@...nulli.us> wrote:
>>
>>>> + if (rtnl_bond_slave_fill(skb, dev))
>>>> + goto nla_put_failure;
>>>> +
>>>
>>> I must say I do not like this at all. This should be done in a generic
>>> way. By a callback registered by bonding and possibly other master-slave
>>> device types.
>>
>> The bond was registered with the ndo_get_slave op. ndo_get_slave could be used for other master-slave device types. I’ll agree that rtnl_bond_slave_fill() could have been written more generically. Is that the objection?
>
> I think is should be done rather in rtnl_link_ops. It's the natural point
> for this ops. I have patchset prepared. Will send it very soon.
Ok, cool.
Also, right now I have IFLA_SLAVE as a nest for IFLA_SLAVE_xxx attrs. Do you think we should have a two-layer nest so we can capture other master-slave devices rather than just bond slaves? I.e.:
IFLA_SLAVE
IFLA_BOND_SLAVE
IFLA_BOND_SLAVE_xxx
IFLA_BOND_SLAVE_yyy
IFLA_BOND_SLAVE_zzz
IFLA_FOO_SLAVE // FOO is some other non-bond master
IFLA_FOO_SLAVE_xxx
IFLA_FOO_SLAVE_yyy
IFLA_FOO_SLAVE_zzz
(Of course, slave wouldn’t be bond and foo slave at same time).
-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