From 003a63a494da183c3ed0fbab30927f7ba3673bd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Thu, 3 Sep 2015 14:23:52 +0200 Subject: vlan: add VLAN flags to trans_tbl to print them properly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit nl-link-list only showed reorder_hdr. $ ip -d link show dev em1.444 28: em1.444@em1: mtu 1500 qdisc noqueue state UP mode DEFAULT group default link/ether 3c:97:0e:58:1d:c1 brd ff:ff:ff:ff:ff:ff promiscuity 0 vlan protocol 802.1Q id 444 ingress-qos-map { 1:3 4:2 } egress-qos-map { 2:6 9:5 } $ /usr/sbin/nl-link-list --details -i 28 em1.444 ether 3c:97:0e:18:2e:a1 slave-of em1 group 0 vlan-id 444 mtu 1500 txqlen 0 weight 0 qdisc noqueue index 28 txq 1 rxq 1 brd ff:ff:ff:ff:ff:ff state up mode default carrier up vlan-info id 444 vlan protocol <129> ingress vlan prio -> qos/socket prio mapping: 1 -> 0x000003, 4 -> 0x000002, egress qos/socket prio -> vlan prio mapping: 0x000002 -> 6, 0x000009 -> 5, ... Signed-off-by: Jiří Klimeš Signed-off-by: Thomas Haller --- lib/route/link/vlan.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/route/link/vlan.c b/lib/route/link/vlan.c index 9dc0d42..d815f65 100644 --- a/lib/route/link/vlan.c +++ b/lib/route/link/vlan.c @@ -610,6 +610,8 @@ struct vlan_map *rtnl_link_vlan_get_egress_map(struct rtnl_link *link, static const struct trans_tbl vlan_flags[] = { __ADD(VLAN_FLAG_REORDER_HDR, reorder_hdr), + __ADD(VLAN_FLAG_GVRP, gvrp), + __ADD(VLAN_FLAG_LOOSE_BINDING, loose_binding), }; /** -- cgit v0.12 From 13001371708b5349425e072825748d3a6722fd9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Thu, 3 Sep 2015 14:23:53 +0200 Subject: vlan: add MVRP VLAN flag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Kernel patch: http://patchwork.ozlabs.org/patch/219040/ iproute2 patch: http://patchwork.ozlabs.org/patch/219364/ Signed-off-by: Jiří Klimeš Signed-off-by: Thomas Haller --- include/linux-private/linux/if_vlan.h | 1 + lib/route/link/vlan.c | 1 + 2 files changed, 2 insertions(+) diff --git a/include/linux-private/linux/if_vlan.h b/include/linux-private/linux/if_vlan.h index 67affd1..bae71c5 100644 --- a/include/linux-private/linux/if_vlan.h +++ b/include/linux-private/linux/if_vlan.h @@ -33,6 +33,7 @@ enum vlan_flags { VLAN_FLAG_REORDER_HDR = 0x1, VLAN_FLAG_GVRP = 0x2, VLAN_FLAG_LOOSE_BINDING = 0x4, + VLAN_FLAG_MVRP = 0x8, }; enum vlan_name_types { diff --git a/lib/route/link/vlan.c b/lib/route/link/vlan.c index d815f65..d266b7e 100644 --- a/lib/route/link/vlan.c +++ b/lib/route/link/vlan.c @@ -612,6 +612,7 @@ static const struct trans_tbl vlan_flags[] = { __ADD(VLAN_FLAG_REORDER_HDR, reorder_hdr), __ADD(VLAN_FLAG_GVRP, gvrp), __ADD(VLAN_FLAG_LOOSE_BINDING, loose_binding), + __ADD(VLAN_FLAG_MVRP, mvrp), }; /** -- cgit v0.12