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
> +/* 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
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