switchdev: add port vlan obj
authorScott Feldman <sfeldma@gmail.com>
Sun, 10 May 2015 16:47:53 +0000 (09:47 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 May 2015 22:43:53 +0000 (18:43 -0400)
VLAN obj has flags (PVID and untagged) as well as start and end vid ranges.
The switchdev driver can optimize programing the device using the ranges.

Signed-off-by: Scott Feldman <sfeldma@gmail.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/switchdev.h

index 4f43300df72c86bc59e2001983e0112a1ca7f5a3..e598c2d45786faf515e280f16a0196e3206bc020 100644 (file)
@@ -43,11 +43,19 @@ struct fib_info;
 
 enum switchdev_obj_id {
        SWITCHDEV_OBJ_UNDEFINED,
+       SWITCHDEV_OBJ_PORT_VLAN,
 };
 
 struct switchdev_obj {
        enum switchdev_obj_id id;
        enum switchdev_trans trans;
+       union {
+               struct switchdev_obj_vlan {                     /* PORT_VLAN */
+                       u16 flags;
+                       u16 vid_start;
+                       u16 vid_end;
+               } vlan;
+       };
 };
 
 /**