diff mbox

[net-next,v5,07/21] switchdev: add port vlan obj

Message ID 1430847297-15728-8-git-send-email-sfeldma@gmail.com
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Scott Feldman May 5, 2015, 5:34 p.m. UTC
From: Scott Feldman <sfeldma@gmail.com>

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>
---
 include/net/switchdev.h |    8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Jiri Pirko May 6, 2015, 6:23 p.m. UTC | #1
Tue, May 05, 2015 at 07:34:43PM CEST, sfeldma@gmail.com wrote:
>From: Scott Feldman <sfeldma@gmail.com>
>
>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>

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/include/net/switchdev.h b/include/net/switchdev.h
index 4f43300..e598c2d 100644
--- a/include/net/switchdev.h
+++ b/include/net/switchdev.h
@@ -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;
+	};
 };
 
 /**