]> git.baikalelectronics.ru Git - kernel.git/commit
net: bridge: vlan options: add support for tunnel id dumping
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Tue, 17 Mar 2020 12:08:35 +0000 (14:08 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Mar 2020 05:47:12 +0000 (22:47 -0700)
commit66d7df6157e4bca19a82ae4e86cf1150202f2595
treed0d1aee72ee428449202729f6ed86d4e9babc551
parent1f3e21ad03428fb980617f0a6bcf6d214645d20e
net: bridge: vlan options: add support for tunnel id dumping

Add a new option - BRIDGE_VLANDB_ENTRY_TUNNEL_ID which is used to dump
the tunnel id mapping. Since they're unique per vlan they can enter a
vlan range if they're consecutive, thus we can calculate the tunnel id
range map simply as: vlan range end id - vlan range start id. The
starting point is the tunnel id in BRIDGE_VLANDB_ENTRY_TUNNEL_ID. This
is similar to how the tunnel entries can be created in a range via the
old API (a vlan range maps to a tunnel range).

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/if_bridge.h
net/bridge/br_netlink_tunnel.c
net/bridge/br_private_tunnel.h
net/bridge/br_vlan_options.c