]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'net-bridge-vlan-options-add-support-for-tunnel-mapping'
authorDavid S. Miller <davem@davemloft.net>
Wed, 18 Mar 2020 05:47:13 +0000 (22:47 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Mar 2020 05:47:13 +0000 (22:47 -0700)
commited62e388cfc9fcc3948dce09279ec0b5cd4363b1
treecccd412e56c23ec98a2ead61f057611f13f79af1
parentb3e1b68c9c7bb6725d8e27cad108ce844e4d55b1
parenta56b151bc1c92b19217b1256a01da85fe36e0fa1
Merge branch 'net-bridge-vlan-options-add-support-for-tunnel-mapping'

Nikolay Aleksandrov says:

====================
net: bridge: vlan options: add support for tunnel mapping

In order to bring the new vlan API on par with the old one and be able
to completely migrate to the new one we need to support vlan tunnel mapping
and statistics. This patch-set takes care of the former by making it a
vlan option. There are two notable issues to deal with:
 - vlan range to tunnel range mapping
   * The tunnel ids are globally unique for the vlan code and a vlan can
     be mapped to one tunnel, so the old API took care of ranges by
     taking the starting tunnel id value and incrementally mapping
     vlan id(i) -> tunnel id(i). This set takes the same approach and
     uses one new attribute - BRIDGE_VLANDB_ENTRY_TUNNEL_ID. If used
     with a vlan range then it's the starting tunnel id to map.

 - tunnel mapping removal
   * Since there are no reserved/special tunnel ids defined, we can't
     encode mapping removal within the new attribute, in order to be
     able to remove a mapping we add a vlan flag which makes the new
     tunnel option remove the mapping

The rest is pretty straight-forward, in fact we directly re-use the old
code for manipulating tunnels by just mapping the command (set/del). In
order to be able to keep detecting vlan ranges we check that the current
vlan has a tunnel and it's extending the current vlan range end's tunnel
id.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>