-
Notifications
You must be signed in to change notification settings - Fork 326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: batman-adv: directed multicast support #1357
Conversation
PS: In the video streaming test I also did a brief mobility/handover test. With one of the laptops at the top I moved down to the cellar and back up, briefly stopping at each node. When moving around the lift before reaching the middle node the streams paused for a few seconds. As expected that metal beast left no chance to wpa_supplicant to perform any smooth handover. Other than that, video playback continued smoothly with only a few video frames lost. At each node I verified that the laptop and its wpa_supplicant had switched to the new AP. |
++ | ||
++ ret = batadv_mcast_forw_want_all_send(bat_priv, skb, vid, &limit); | ||
++ if (ret != NET_XMIT_SUCCESS) | ||
++ return ret; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In conjunction with Line 423, this seems to have the effect of not delivering the packet to nodes with the want-all flag set in case no other node has the multicast address in the transtable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Urgh, you are absolutely right, line 423 should return NET_XMIT_SUCCESS instead of NET_XMIT_DROP... will fix this PR later today. Many thanks for spotting and identifying the issue, @blocktrron! And thanks to you and @mweinelt for testing this PR.
aea5217
to
8aa9534
Compare
Changelog v2:
|
I can confirm the issues we encountered are fixed in v2. Thanks! |
0bf3b72c33d9 nat46: fixup PKG_MIRROR_HASH 23aa2e7b4afa nodogsplash2: Add NDS Restart Hook for Firewall (#369) 7ae81c8311ec cjdns: 20.1 -> 20.2 ff7b5da265e1 prince: version bump to v0.4 2f90fe406c58 miniupnpd: De-maintainering myself. fdaa4cde3b2c bmx7: bump version 455a54207c84 batman-adv: upgrade package to latest release 2018.1 2e4937ea68f8 batctl: upgrade package to latest release 2018.1 a0eca40b0003 alfred: upgrade package to latest release 2018.1 015e5e99f2b6 bmx7: use configReaload on service reload 0ced8ec5a763 bmx7: keep bmx7 secret keys on sysupgrade 4bff0b3c65c5 cjdns: build fixes 7fc2fbdfc1b7 babeld: release 1.8.1 135bc605b4cf alfred: Support interface IDs with more than two digits 91e600e1cd9a bmx7: convert init script to use procd 86be0095b475 nodogsplash2: Add compatibility with mwan3 v2 17fccad969ea smcroute: Change download to HTTP 63cae8f571a6 bmx7: bump version
8aa9534
to
2b70d07
Compare
Changelog v3:
As soon as some community returns some positive feedback for this patchset in their otherwise Gluon v2018.1 based production network network then I will remove the "RFC". As I said before, no need to apply this patchset on all nodes yet, just some test node(s) is fine as long as (most of) the rest of your network runs v2018.1. |
Some useful commands to check whether your network is and which multicast addresses are or are not suitable for tests:
Make sure that for the multicast address you are playing with has a total, summed unsupportive node count plus receiver node count matching your multicast address < 16. Also, with the VLC example above your multicast receivers should show up in this "number of receivers" table. Also on your multicast receiving host running Linux have a look at |
we need to understand if #1468 is induced by this patch. Happily removing blocked when we know this is not the case. |
It is unclear if the multicast patches are the cause of the crash in #1468, so this is not blocked but instead requires a decision on how to proceed. We in Darmstadt have been testing this patch since its inception and had no issues with it in months. |
The patch is meant to appeal to a wider audience in order to gain momentum for an upstream merge. I find the approach to be valid and I am interested in the feature. It has undergone a review by blocktron and FFDA is running it for months. As discussed on IRC I see two risks:
I support merging this patch given (1) is addressed. @NeoRaider @rotanid @mweinelt what are your thoughts? |
i'm against merging a non-upstreamed patch like this. |
Just some background information why I haven't submitted the patches to upstream yet: Linux network subsystem maintainers are increasingly demanding a "new" interface for configurations (sysfs -> netlink). And have recently expressed this towards batman-adv which does not have a netlink interface for configuration options yet. Therefore any patch introducing new configuration options, including this one, will likely be rejected for now. @ecsv has provided some initial patches to introduce netlink support for configuration options in batman-adv. However, this will probably need a bit more time. Until then I can't submit this patch upstream. I'm also absolutely in favor of an "upstream-first" policy. I guess since many communities have switched to a multi-domain setup now, there is no hurry? Otherwise, if multicast overhead is an urgent issue for some larger communities I guess we could also interpret this pull-request as a fix. And apply it regardless of upstreaming status (and I'm definitely going to upstream). But I currently have no overview of the urgency. |
2b70d07
to
1bfe69f
Compare
Changelog v4:
|
1bfe69f
to
30635fb
Compare
Changelog v5:
|
We already have multicast-to-unicast support between client and node. And batman-adv has multicast-to-unicast conversion capabilities if there is only one receiver. Now this patchset adds node-to-node multicast-to-unicast support to multiple targets as well. This should save airtime for ICMPv6 Router Solicitations, for instance. Here we have multiple targets for the same IPv6 multicast destination address. However, the number of destination nodes is still rather small in this case, i.e. all gateways, making multiple unicast transmissions less costly than flooding a packet through the whole mesh. Also, this allows playing with multicast streaming to a limited set of destination nodes (default setting: 16). Also, nearly all nodes should be running a batman-adv version which was compiled with CONFIG_BATMAN_ADV_MCAST=y (e.g. Gluon v2018.1 or later) for this feature to take effect. Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
With multicast_fanout limit set to 16, meaning a fallback to classic broadcast flooding in case of more than 16 recipient nodes. Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
Allow the transmission of a multicast packet as long as it is not flooded through the whole mesh. Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
30635fb
to
b22c708
Compare
Changelog v6:
|
The fanout change will be part of the batman-adv 2019.2 release |
@rotanid No, there are also a noflood_mark which is not upstream. I am unsure about its usefulness in upstream batman-adv since it is rather tied to the gluon specific 355-mcast-drop. But we also have this ap_isolation which is rather similar. |
With DAT DHCP snooping, the gateway feature and multicast optimizations in place in some scenarios broadcast flooding might not be strictly necessary anymore to be able to establish IPv4/IPv6 communication. Therefore this patch adds an option to disable broadcast flooding. Larger mesh networks typically filter a variety of multicast packets via ebtables/netfilter to clamp on overhead. With this option such firewall rules can be relaxed so that such multicast packets are only dropped if they cannot be handled by multicast-to-unicast, for instance. "noflood" comes in two flavours: If set to 1 then flood prevention is enabled for all multicast/broadcast packets except ICMPv6 and IGMP (cautious mode). Or, if set to 2 then flood prevention is enabled for all multicast/broadcast packets (aggressive mode). If set to 0 then flood prevention is disabled. "noflood" is disabled by default as there are still some things to take care of to avoid breaking things (especially for the "aggressive mode"). Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue> --- The initial approach was a "noflood"-mark which worked similar to the isolation mark. Which allowed more flexibility so that the user could mark specific packets to be excluded from broadcast flooding via ebtables/netfilter. However, in practice skb-marking is not that easy to configure and if misconfigured will break a network horribly. Which was also a downside noted and discussed at BattleMesh v11. This version now is a less flexible but therefore also simpler to use variant. [0]: https://git.open-mesh.org/batman-adv.git/shortlog/refs/heads/linus/noflood-mark [1]: freifunk-gluon/gluon#1357
@@ -1 +1,6 @@ | |||
if os.execute('batctl -v | grep -q "batman-adv: 2013.4"') ~= 0 then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
batman-adv-legacy was dropped after v2019.1 was branched.
The following changes and patches add multicast-to-multi-unicast support between nodes. It supports IPv6 link-local multicast with up to 16 target nodes and if exceeded, either falls back to flooding (e.g. for important ones like ICMPv6 Neighbor Solicitations) or drops them if the gluon-ebtables-filter-multicast is installed.
This should fix our current issue of larger mesh networks having a significant amount of and overhead through ICMPv6 Neighbor Solicitations.
Recap of what we already have:
This adds the missing piece to have directed, brodcast-less multicast for the whole path from one client to another.
For batman-adv:
For gluon-ebtables-filter-multicast:
For gluon-mesh-batman-adv:
This needs a good amount of (more) testing from other people, therefore sending it as RFC.
Once your community has fully migrated to a Gluon v2018.1 you can test this patchset: v2018.1 has the whole listener side ready. This patch only touches the multicast sender side, so you can add this patchset to dedicated nodes which have the multicast sending devices while receiving on any Gluon >=v2018.1 node.