Re: [PATCH net-next v2 2/2] bonding: add netlink attributes to slave link dev

Scott Feldman
2014-01-21T21:37:05Z

On Jan 21, 2014, at 5:34 AM, Jiri Pirko <jiri@resnulli.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 have something in mind, will try to prepare patch soon.