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
485485 * [BRIDGE_VLANDB_ENTRY_INFO]
486486 * ...
487487 * }
488+ * [BRIDGE_VLANDB_GLOBAL_OPTIONS] = {
489+ * [BRIDGE_VLANDB_GOPTS_ID]
490+ * ...
491+ * }
488492 */
489493 enum {
490494 BRIDGE_VLANDB_UNSPEC,
491495 BRIDGE_VLANDB_ENTRY,
496+ BRIDGE_VLANDB_GLOBAL_OPTIONS,
492497 __BRIDGE_VLANDB_MAX,
493498 };
494499 #define BRIDGE_VLANDB_MAX (__BRIDGE_VLANDB_MAX - 1)
@@ -538,6 +543,14 @@ enum { · 43 unmodified lines
538543 };
539544 #define BRIDGE_VLANDB_STATS_MAX (__BRIDGE_VLANDB_STATS_MAX - 1)
540545
546+enum {
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+
541554 /* Bridge multicast database attributes
542555 * [MDBA_MDB] = {
543556 * [MDBA_MDB_ENTRY] = {