aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2020-01-15 13:48:18 +0100
committerDavid S. Miller <davem@davemloft.net>2020-01-15 13:48:18 +0100
commit4e2fa6b902751da6e15ad1bc748a65498ed28c94 (patch)
treefabdf1329730096e3334d1a478749d8dd6be344d /net/batman-adv
parentMerge branch 'net-Add-route-offload-indication' (diff)
parentnet: bridge: vlan: notify on vlan add/delete/change flags (diff)
downloadlinux-dev-4e2fa6b902751da6e15ad1bc748a65498ed28c94.tar.xz
linux-dev-4e2fa6b902751da6e15ad1bc748a65498ed28c94.zip
Merge branch 'bridge-add-vlan-notifications-and-rtm-support'
Nikolay Aleksandrov says: ==================== net: bridge: add vlan notifications and rtm support This patch-set is a prerequisite for adding per-vlan options support because we need to be able to send vlan-only notifications and do larger vlan netlink dumps. Per-vlan options are needed as we move the control more to vlans and would like to add per-vlan state (needed for per-vlan STP and EVPN), per-vlan multicast options and control, and I'm sure there would be many more per-vlan options coming. Now we create/delete/dump vlans with the device AF_SPEC attribute which is fine since we support vlan ranges or use a compact bridge_vlan_info structure, but that cannot really be extended to support per-vlan options well. The biggest issue is dumping them - we tried using the af_spec with a new vlan option attribute but that led to insufficient message size quickly, also another minor problem with that is we have to dump all vlans always when notifying which, with options present, can be huge if they have different options set, so we decided to add new rtm message types specifically for vlans and register handlers for them and a new bridge vlan notification nl group for vlan-only notifications. The new RTM NEW/DEL/GETVLAN types introduced match the current af spec bridge functionality and in fact use the same helpers. The new nl format is: [BRIDGE_VLANDB_ENTRY] [BRIDGE_VLANDB_ENTRY_INFO] - bridge_vlan_info (either 1 vlan or range start) [BRIDGE_VLANDB_ENTRY_RANGE] - range end This allows to encapsulate a range in a single attribute and also to create vlans and immediately set options on all of them with a single attribute. The GETVLAN dump can span multiple messages and dump all the necessary information. The vlan-only notifications are sent on NEW/DELVLAN events or when vlan options change (currently only flags), we try hard to compress the vlans into ranges in the notifications as well. When the per-vlan options are added we'll add helpers to check for option equality between neighbor vlans and will keep compressing them when possible. Note patch 02 is not really required, it's just a nice addition to have human-readable error messages from the different vlan checks. iproute2 changes and selftests will be sent with the next set which adds the first per-vlan option - per-vlan state similar to the port state. v2: changed patch 03 and patch 04 to use nlmsg_parse() in order to strictly validate the msg and make sure there are no remaining bytes ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/batman-adv')
0 files changed, 0 insertions, 0 deletions