Subject: Re: [PATCH net-next v2 25/26] switchdev: convert swdev_fib_ipv4_add/del over to swdev_port_obj_add/del

From: Florian Fainelli <[email-masked]>
Date: Fri, 03 Apr 2015 11:00:56 -0700

On 01/04/15 09:05, Jiri Pirko wrote:
>> This looks nice. However, my only concern is we have now ended up adding a
>> whole layer of abstraction to all objects. The api abstraction seemed fine.
>> But, carrying it to objects and duplicating every object in the swdev layer
>> seems too much duplication. Maybe its just me.
>> we will end up adding this for bond attributes...vxlan...fdb and nftables
> 
> +1

+1.

> 
>> etc.
>>
>> The advantage of switchdev in the kernel was to have access the existing
>> kernel api and objects directly from switchdev layer.
>> In which case, to me, it would be better to skip this extra layer of objects.
>> And keep the way you had it originally.

Same here, I am not exactly sure how much good the abstract object is
giving us here since we are already in the kernel, and we cannot/do not
necessarily want to eliminate a large number of swdev_ops, as these are
precisely the API we want to define.

NB: if we were to do that for swdev_ops, the next step would be doing
the same thing for netdev_ops to reduce their number, would not we?

Maybe for now solving the stacked device problem and
prepare/commit/rollback is good enough to keep you busy that adding the
object layer is a completely secondary problem to solve ;)?
-- 
Florian