Re: [RFC PATCH] net: bridge: multicast querier per VLAN support
From: Nikolay Aleksandrov <hidden>
Date: 2018-04-18 16:27:48
On April 18, 2018 6:54:07 PM GMT+03:00, Stephen Hemminger [off-list ref] wrote:
On Wed, 18 Apr 2018 16:14:26 +0300 Nikolay Aleksandrov [off-list ref] wrote:quoted
On 18/04/18 16:07, Joachim Nilsson wrote:quoted
On Wed, Apr 18, 2018 at 03:31:57PM +0300, Nikolay Aleksandrovwrote:quoted
quoted
quoted
On 18/04/18 15:07, Joachim Nilsson wrote:quoted
- First of all, is this patch useful to anyoneObviously to us as it's based on our patch. :-) We actually recently discussed what will be needed to make itacceptable to upstream.quoted
quoted
Great! :)quoted
quoted
- The current br_multicast.c is very complex. The support forboth IPv4quoted
quoted
quoted
quoted
and IPv6 is a no-brainer, but it also has #ifdefVLAN_FILTERING andquoted
quoted
quoted
quoted
'br->vlan_enabled' ... this has likely been discussed before,but ifquoted
quoted
quoted
quoted
we could remove those code paths I believe what's left wouldbe quitequoted
quoted
quoted
quoted
a bit easier to read and maintain.br->vlan_enabled has a wrapper that can be used without ifdefs, asdoes br_vlan_find()quoted
quoted
quoted
so in short - you can remove the ifdefs and use the wrappers,they'll degrade to alwaysquoted
quoted
quoted
false/null when vlans are disabled.Thanks, I'll have a look at that and prepare an RFC v2!quoted
quoted
- Many per-bridge specific multicast sysfs settings may need tohave aquoted
quoted
quoted
quoted
corresponding per-VLAN setting, e.g. snooping, query_interval,etc.quoted
quoted
quoted
quoted
How should we go about that? (For status reporting I have aproposal)quoted
quoted
quoted
We'll have to add more to the per-vlan context, but yes it has tohappen.quoted
quoted
quoted
It will be only netlink interface for config/retrieval, no sysfs.quoted
quoted
Some settings are possible to do with sysfs, likemulticast_query_intervalquoted
quoted
and ...We want to avoid sysfs in general, all of networking config and stats are moving to netlink. It is better controlled and structured forsuchquoted
changes, also provides nice interfaces for automatic type checksetc.quoted
Also (but a minor reason) there is no tree/entity in sysfs for thevlansquoted
where to add this. It will either have to be a file which does some format string hack (like us currently) or will need to add new treeforquoted
them which I'd really like to avoid for the bridge.In general, all bridge attributes need to show in netlink and sysfs. Sysfs is easier for scripting from languages.
True, but vlans and per-vlan settings have never been exposed via sysfs, only through netlink. I'd like to avoid adding a directory with potentially 4k multiplied by the attr number for each vlan entries. There is already vlan config infrastructure via netlink.