mbox series

[0/6] batman-adv: Add routeable multicast optimizations

Message ID 20190424011919.9821-1-linus.luessing@c0d3.blue
Headers show
Series batman-adv: Add routeable multicast optimizations | expand

Message

Linus Lüssing April 24, 2019, 1:19 a.m. UTC
The following patchset fills the next gaps in the multicast address
rules page by adding support for group-aware optimizations for
multicast addresses of scope greater than link-local. So far, only
link-local addresses were optimized as packets with routeable
addresses not only need to be forwarded to local multicast listeners
but also multicast routers.

"Handling rules depending on multicast address:" [0]

Before:

* Ipv4, link-local: supported without bridges
* IPv6, link-local: supported
* IPv4, routeable: support planned.
* IPv6, routeable: support planned.

After:

* Ipv4, link-local: supported without bridges
* IPv6, link-local: supported
* IPv4, routeable: supported without bridges.
* IPv6, routeable: supported.


The first patch is a fix for the maint branch addressing tickets #369
and #370.

Then patches 2 to 4 are basically some cleanups and restructuring of the
current code.

Patch 5 adds the detection of multicast routers and announces
that via two new flags in its multicast TVLV. TVLV receivers will
memorize this and fill lists similar to how we already do for the
WANT_ALL_IPV4/IPV6 flags. Currently the detection for bridged-in
IPv6 multicast routers is not quite what the RFC for multicast router
discovery suggests. But once the MRD implementation in the Linux bridge
has matured a bit, I'm going to swap this simplified approach with
tapping into the bridge once more, asking the bridge for the presence of
multicast routers on the link. (This will then also add support for
"IPv4, routeable, with bridges")

Finally, patch 6 implements the changes to the forwarding plane,
utilizing the new information we have gathered with patch 5.

Regards, Linus

[0]: https://www.open-mesh.org/projects/batman-adv/wiki/Multicast-optimizations-tech#Handling-rules-depending-on-multicast-address

Comments

Sven Eckelmann May 5, 2019, 5:37 p.m. UTC | #1
On Wednesday, 24 April 2019 03:19:13 CEST Linus Lüssing wrote:
> The following patchset fills the next gaps in the multicast address
> rules page by adding support for group-aware optimizations for
> multicast addresses of scope greater than link-local. So far, only
> link-local addresses were optimized as packets with routeable
> addresses not only need to be forwarded to local multicast listeners
> but also multicast routers.
[...]

I get a lot of build errors when trying to build these patches. Here is the 
complete list, including warnings of other build tests:

Output of different failed tests
================================

ecsv/pu: checkpatch ./net/batman-adv/multicast.c
------------------------------------------------

    CHECK: Blank lines aren't necessary before a close brace '}'
    #791: FILE: ./net/batman-adv/multicast.c:791:
    +
    +}
    
    WARNING: Block comments should align the * on each line
    #799: FILE: ./net/batman-adv/multicast.c:799:
    + * capabilities and inabilities.
    +  */
    
    total: 0 errors, 1 warnings, 1 checks, 2368 lines checked

ecsv/pu: headers
----------------

    diff --git a/net/batman-adv/multicast.c b/net/batman-adv/multicast.c
    index ca4898d3..f106728b 100644
    --- a/net/batman-adv/multicast.c
    +++ b/net/batman-adv/multicast.c
    @@ -23,7 +23,6 @@
     #include <linux/inetdevice.h>
     #include <linux/ip.h>
     #include <linux/ipv6.h>
    -#include <linux/jiffies.h>
     #include <linux/kernel.h>
     #include <linux/kref.h>
     #include <linux/list.h>

ecsv/pu: kerneldoc ./net/batman-adv/multicast.c
-----------------------------------------------

    ./net/batman-adv/multicast.c:803: warning: Function parameter or member 'flags' not described in 'batadv_mcast_mla_flags_update'

ecsv/pu: kerneldoc ./net/batman-adv/types.h
-------------------------------------------

    ./net/batman-adv/types.h:1200: warning: Function parameter or member 'tvlv_flags' not described in 'batadv_mcast_mla_flags'

ecsv/pu: kerneldoc include/uapi/linux/batadv_packet.h
-----------------------------------------------------

    include/uapi/linux/batadv_packet.h:124: warning: Enum value 'BATADV_MCAST_WANT_ALL_RTR6' not described in enum 'batadv_mcast_flags'
    include/uapi/linux/batadv_packet.h:124: warning: Excess enum value 'BATADV_MCAST_NO_WANT_ALL_RTR6' description in 'batadv_mcast_flags'

ecsv/pu: sparse linux-3.18 cfg: BLA=y DAT=y DEBUGFS=y DEBUG=y TRACING=n NC=n MCAST=y BATMAN_V=n SYSFS=n
---------------------------------------------------------------------------

    In file included from /home/build_test/build_env/tmp.2gwYBLVNdO/net/batman-adv/main.h:216:0,
                     from /home/build_test/build_env/tmp.2gwYBLVNdO/net/batman-adv/bat_algo.c:7:
    /home/build_test/build_env/tmp.2gwYBLVNdO/net/batman-adv/types.h:1255:13: error: duplicate member ‘mla_lock’
      spinlock_t mla_lock;
                 ^~~~~~~~
    make[3]: *** [/home/build_test/build_env/tmp.2gwYBLVNdO/net/batman-adv/bat_algo.o] Error 1
    make[2]: *** [/home/build_test/build_env/tmp.2gwYBLVNdO/net/batman-adv] Error 2
    make[1]: *** [_module_/home/build_test/build_env/tmp.2gwYBLVNdO] Error 2
    make: *** [all] Error 2

ecsv/pu: sparse linux-4.14.104 cfg: BLA=y DAT=y DEBUGFS=y DEBUG=n TRACING=y NC=n MCAST=y BATMAN_V=y SYSFS=y
---------------------------------------------------------------------------

    In file included from /home/build_test/build_env/tmp.2gwYBLVNdO/net/batman-adv/main.h:216:0,
                     from /home/build_test/build_env/tmp.2gwYBLVNdO/net/batman-adv/bat_algo.c:7:
    /home/build_test/build_env/tmp.2gwYBLVNdO/net/batman-adv/types.h:1255:13: error: duplicate member ‘mla_lock’
      spinlock_t mla_lock;
                 ^~~~~~~~
    make[3]: *** [/home/build_test/build_env/tmp.2gwYBLVNdO/net/batman-adv/bat_algo.o] Error 1
    make[2]: *** [/home/build_test/build_env/tmp.2gwYBLVNdO/net/batman-adv] Error 2
    make[1]: *** [_module_/home/build_test/build_env/tmp.2gwYBLVNdO] Error 2
    make: *** [all] Error 2

Kind regards,
	Sven
Linus Lüssing May 7, 2019, 4:22 a.m. UTC | #2
On Sun, May 05, 2019 at 07:37:48PM +0200, Sven Eckelmann wrote:
> ecsv/pu: headers
> ----------------
> 
>     diff --git a/net/batman-adv/multicast.c b/net/batman-adv/multicast.c
>     index ca4898d3..f106728b 100644
>     --- a/net/batman-adv/multicast.c
>     +++ b/net/batman-adv/multicast.c
>     @@ -23,7 +23,6 @@
>      #include <linux/inetdevice.h>
>      #include <linux/ip.h>
>      #include <linux/ipv6.h>
>     -#include <linux/jiffies.h>
>      #include <linux/kernel.h>
>      #include <linux/kref.h>
>      #include <linux/list.h>

I did not make any changes to this as I believe jiffies.h is still
needed for msecs_to_jiffies()?

The rest should be addressed in the new patchsets.