History

net: bridge: vlan: add support for global options

We can have two types of vlan options depending on context: - per-device vlan options (split in per-bridge and per-port) - global vlan options The second type wasn't supported in the bridge until now, but we need them for per-vlan multicast support, per-vlan STP support and other options which require global vlan context. They are contained in the global bridge vlan context even if the vlan is not configured on the bridge device itself. This patch adds initial netlink attributes and support for setting these global vlan options, they can only be set (RTM_NEWVLAN) and the operation must use the bridge device. Since there are no such options yet it shouldn't have any functional effect.

Nikolay Aleksandrov committed 5 years ago

Commit 47ecd2d1 parent 1e9ca454 files · +115 −3Browse files

Showing the changes to include/uapi (1 of 4 files). Show all

Unified · Split

include/uapi/linux/if_bridge.h+13−0
@@ -485,10 +485,15 @@ enum { · 484 unmodified lines
485 * [BRIDGE_VLANDB_ENTRY_INFO]485 * [BRIDGE_VLANDB_ENTRY_INFO]
486 * ...486 * ...
487 * }487 * }
488 * [BRIDGE_VLANDB_GLOBAL_OPTIONS] = {
489 * [BRIDGE_VLANDB_GOPTS_ID]
490 * ...
491 * }
488 */492 */
489enum {493enum {
490 BRIDGE_VLANDB_UNSPEC,494 BRIDGE_VLANDB_UNSPEC,
491 BRIDGE_VLANDB_ENTRY,495 BRIDGE_VLANDB_ENTRY,
496 BRIDGE_VLANDB_GLOBAL_OPTIONS,
492 __BRIDGE_VLANDB_MAX,497 __BRIDGE_VLANDB_MAX,
493};498};
494#define BRIDGE_VLANDB_MAX (__BRIDGE_VLANDB_MAX - 1)499#define BRIDGE_VLANDB_MAX (__BRIDGE_VLANDB_MAX - 1)
@@ -538,6 +543,14 @@ enum { · 43 unmodified lines
538};543};
539#define BRIDGE_VLANDB_STATS_MAX (__BRIDGE_VLANDB_STATS_MAX - 1)544#define BRIDGE_VLANDB_STATS_MAX (__BRIDGE_VLANDB_STATS_MAX - 1)
540 545
546enum {
547 BRIDGE_VLANDB_GOPTS_UNSPEC,
548 BRIDGE_VLANDB_GOPTS_ID,
549 BRIDGE_VLANDB_GOPTS_RANGE,
550 __BRIDGE_VLANDB_GOPTS_MAX
551};
552#define BRIDGE_VLANDB_GOPTS_MAX (__BRIDGE_VLANDB_GOPTS_MAX - 1)
553
541/* Bridge multicast database attributes554/* Bridge multicast database attributes
542 * [MDBA_MDB] = {555 * [MDBA_MDB] = {
543 * [MDBA_MDB_ENTRY] = {556 * [MDBA_MDB_ENTRY] = {