Re: [RFC PATCH net-next 1/3] net: switchdev: extract switchdev_obj_vlan

2015-09-09 Thread Scott Feldman
On Tue, Sep 8, 2015 at 1:47 PM, Vivien Didelot wrote: > Move the switchdev_obj_vlan structure out of the switchdev_obj union. > > This lightens the switchdev_obj structure and allows drivers to access > the object transaction and callback directly from a switchdev_obj_vlan. > This is more consiste

Re: [RFC PATCH net-next 1/3] net: switchdev: extract switchdev_obj_vlan

2015-09-08 Thread Andrew Lunn
> +/* SWITCHDEV_OBJ_PORT_VLAN */ > +struct switchdev_obj_vlan { > + struct switchdev_obj obj; /* must be first */ > + u16 flags; > + u16 vid_begin; > + u16 vid_end; > +}; I know you give a few examples for where this is done in network code, but i think container_of() is used

[RFC PATCH net-next 1/3] net: switchdev: extract switchdev_obj_vlan

2015-09-08 Thread Vivien Didelot
Move the switchdev_obj_vlan structure out of the switchdev_obj union. This lightens the switchdev_obj structure and allows drivers to access the object transaction and callback directly from a switchdev_obj_vlan. This is more consistent and convenient for add and dump operations. The patch update