> +/* 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 much more. You can then place the
struct switchdev_obj anywhere in the structure, and it will work.
#define to_switchdev_obj_vlan(o) container_of(o, struct switchdev_obj_vlan, obj)
Andrew
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html