Skip to content

Commit b3c7ef0

Browse files
roopa-prabhudavem330
authored andcommitted
bridge: uapi: add per vlan tunnel info
New nested netlink attribute to associate tunnel info per vlan. This is used by bridge driver to send tunnel metadata to bridge ports in vlan tunnel mode. This patch also adds new per port flag IFLA_BRPORT_VLAN_TUNNEL to enable vlan tunnel mode. off by default. One example use for this is a vxlan bridging gateway or vtep which maps vlans to vn-segments (or vnis). User can configure per-vlan tunnel information which the bridge driver can use to bridge vlan into the corresponding vn-segment. Signed-off-by: Roopa Prabhu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 3ad7a4b commit b3c7ef0

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

include/linux/if_bridge.h

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ struct br_ip_list {
4747
#define BR_PROXYARP_WIFI BIT(10)
4848
#define BR_MCAST_FLOOD BIT(11)
4949
#define BR_MULTICAST_TO_UNICAST BIT(12)
50+
#define BR_VLAN_TUNNEL BIT(13)
5051

5152
#define BR_DEFAULT_AGEING_TIME (300 * HZ)
5253

include/uapi/linux/if_bridge.h

+11
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ enum {
118118
IFLA_BRIDGE_FLAGS,
119119
IFLA_BRIDGE_MODE,
120120
IFLA_BRIDGE_VLAN_INFO,
121+
IFLA_BRIDGE_VLAN_TUNNEL_INFO,
121122
__IFLA_BRIDGE_MAX,
122123
};
123124
#define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1)
@@ -134,6 +135,16 @@ struct bridge_vlan_info {
134135
__u16 vid;
135136
};
136137

138+
enum {
139+
IFLA_BRIDGE_VLAN_TUNNEL_UNSPEC,
140+
IFLA_BRIDGE_VLAN_TUNNEL_ID,
141+
IFLA_BRIDGE_VLAN_TUNNEL_VID,
142+
IFLA_BRIDGE_VLAN_TUNNEL_FLAGS,
143+
__IFLA_BRIDGE_VLAN_TUNNEL_MAX,
144+
};
145+
146+
#define IFLA_BRIDGE_VLAN_TUNNEL_MAX (__IFLA_BRIDGE_VLAN_TUNNEL_MAX - 1)
147+
137148
struct bridge_vlan_xstats {
138149
__u64 rx_bytes;
139150
__u64 rx_packets;

include/uapi/linux/if_link.h

+1
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ enum {
322322
IFLA_BRPORT_PAD,
323323
IFLA_BRPORT_MCAST_FLOOD,
324324
IFLA_BRPORT_MCAST_TO_UCAST,
325+
IFLA_BRPORT_VLAN_TUNNEL,
325326
__IFLA_BRPORT_MAX
326327
};
327328
#define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)

0 commit comments

Comments
 (0)