batman-adv: Always flood IGMP/MLD reports
Subsystems (2)
cover batman-adv: Always flood IGMP/MLD reports
The last round of multicast patches send to the batman-adv mailinglist to add support for the multicast optimizations in bridged scenarios, too, unfortunately had one major conceptual flaw: It could lead to packet loss. It's not sufficient to have the unicasting of reports implemented on bridge-nodes only. Nodes without bridges need to either unicast them, too or as done with this patch flood them uncoditionally.
The issue is described in detail here:
https://www.open-mesh.org/projects/batman-adv/wiki/Multicast-optimizations-listener-reports
This patch substitutes and greatly simplifies the following patchset:
"batman-adv: Unicasting multicast reports to querier-node only"
The reason for doing this is, that I think the disadvantages of this simpler approach noted in the wikipage above (e.g. report overhead in large mesh networks) can be better compensated by segmenting the IGMP/MLD domain via ebtables (drop all queries and reports coming out of bat0 or before entering bat0) and the "multicast_router" bridge port flag on bat0 (flood all multicast to this bat0 port, let batman-adv deal with the optimizations from here on). Segmenting the IGMP/MLD domain also has the nice advantage of being able to run a querier on every mesh node which therefore is a way more decentral approach.
Cheers, Linus
-----
Changelog
v1:
* Removed query snooping and state
* Squashed all three patches into one
* Renamed "batadv_mcast_tvlv_ogm_handler_v1()" to *_v2()
* Added explicit icmpv6.h include
* Rebased on top of master
Old changelog of
"batman-adv: Unicasting multicast reports to querier-node only" v6:
* compat: copied copyright headers from original upstream c files
* compat: unified ordering in compat c files:
-> copyright header, then includes, then kernel specific functions
v5:
* Removed RFC tag: Needed exports got merged to net-next and are going to be available with Linux 4.2
* Redid compat solution - now fully backwards compatible down to 2.6.33
v4:
* excluded bridge part from this patchset, they should
hopefully be added to net-next soon
* Added a compat solution (PATCH 3/3)
* Removed Kconfig-depends as by David's suggestion the needed parsing functions for MLD are going to be forced built-ins even if IPv6 is going to be built as a module
* Removed unused variable 'int ret' in batadv_mcast_is_report_ipv6()
* Adjusted to new folder structure
v3:
* Adding Kconfig-depends and #if's
(so basically adding similar dependancy constraints as the bridge code
has, except that there are no depends if batman-adv gets compiled without multicast optimizations)
-> the case of IPv6=M and batman-adv=y is still impossible if multicast
optimizations are enabled; but I don't see the practical demand for that either - people who use IPv6 as a module will probably also want to use batman-adv as a module
v2:
* various bugfixes (now runtime tested, too - should(tm) work)
* added netdev+bridge mailinglists
PATCH 1/1 batman-adv: Always flood IGMP/MLD reports
With this patch IGMP or MLD reports are always flooded. This is necessary for the upcoming bridge integration:
An IGMPv2/MLDv1 querier does not actively join the multicast group the reports are sent to. Because of this, this would lead to snooping bridges/switches not being able to learn of multicast listeners in the mesh and wrongly shutting down ports for multicast traffic to the mesh, leading to packet loss.
This patch increments the multicast tvlv version number to 2.
--- Makefile | 4 + compat-include/linux/igmp.h | 13 ++ compat-include/linux/skbuff.h | 14 ++ compat-include/net/addrconf.h | 13 ++ compat-include/net/ip6_checksum.h | 18 +++ compat-include/net/ipv6.h | 17 +++ compat-include/net/mld.h | 52 +++++++ compat-sources/Makefile | 3 + compat-sources/net/core/skbuff.c | 179 ++++++++++++++++++++++++ compat-sources/net/ipv4/igmp.c | 241 +++++++++++++++++++++++++++++++++ compat-sources/net/ipv6/mcast_snoop.c | 216 +++++++++++++++++++++++++++++ net/batman-adv/multicast.c | 76 +++++++++-- net/batman-adv/soft-interface.c | 2 + 13 files changed, 840 insertions(+), 8 deletions(-) create mode 100644 compat-include/linux/igmp.h create mode 100644 compat-include/net/addrconf.h create mode 100644 compat-include/net/ip6_checksum.h create mode 100644 compat-include/net/ipv6.h create mode 100644 compat-include/net/mld.h create mode 100644 compat-sources/Makefile create mode 100644 compat-sources/net/core/skbuff.c create mode 100644 compat-sources/net/ipv4/igmp.c create mode 100644 compat-sources/net/ipv6/mcast_snoop.c
Makefile +4 -0
@@ -50,6 +50,10 @@ ifneq ($(REVISION),) NOSTDINC_FLAGS += -DBATADV_SOURCE_VERSION=\"$(REVISION)\" endif +include $(PWD)/compat-sources/Makefile + +export batman-adv-y + BUILD_FLAGS := \ M=$(PWD)/net/batman-adv \ CONFIG_BATMAN_ADV=m \
compat-include/linux/igmp.h new file +13 -0
@@ -0,0 +1,13 @@ +#ifndef _NET_BATMAN_ADV_COMPAT_LINUX_IGMP_H_ +#define _NET_BATMAN_ADV_COMPAT_LINUX_IGMP_H_ + +#include <linux/version.h> +#include_next <linux/igmp.h> + +#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,2 ,0 ) + +int ip_mc_check_igmp (struct sk_buff *skb,struct sk_buff **skb_trimmed); + +#endif /* < KERNEL_VERSION(4, 2, 0) */ + +#endif /* _NET_BATMAN_ADV_COMPAT_LINUX_IGMP_H_ */
compat-include/linux/skbuff.h +14 -0
@@ -89,6 +89,20 @@ static inline void skb_reset_mac_len(struct sk_buff *skb)#define pskb_copy_for_clone pskb_copy +__sum16 skb_checksum_simple_validate (struct sk_buff *skb); + +__sum16 +skb_checksum_validate (struct sk_buff *skb,int proto, +__wsum (*compute_pseudo)(struct sk_buff *skb,int proto)); +#endif /* < KERNEL_VERSION(3, 16, 0) */ +#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,2 ,0 ) + +struct sk_buff *skb_checksum_trimmed (struct sk_buff *skb, +unsigned int transport_len, +__sum16 (*skb_chkf)(struct sk_buff *skb)); + +#endif /* < KERNEL_VERSION(4, 2, 0) */ +#endif /* _NET_BATMAN_ADV_COMPAT_LINUX_SKBUFF_H_ */
compat-include/net/addrconf.h new file +13 -0
@@ -0,0 +1,13 @@ +#ifndef _NET_BATMAN_ADV_COMPAT_NET_ADDRCONF_H_ +#define _NET_BATMAN_ADV_COMPAT_NET_ADDRCONF_H_ + +#include <linux/version.h> +#include_next <net/addrconf.h> + +#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,2 ,0 ) + +int ipv6_mc_check_mld (struct sk_buff *skb,struct sk_buff **skb_trimmed); + +#endif /* < KERNEL_VERSION(4, 2, 0) */ + +#endif /* _NET_BATMAN_ADV_COMPAT_NET_ADDRCONF_H_ */
compat-include/net/ip6_checksum.h new file +18 -0
@@ -0,0 +1,18 @@ +#ifndef _NET_BATMAN_ADV_COMPAT_NET_IP6_CHECKSUM_H_ +#define _NET_BATMAN_ADV_COMPAT_NET_IP6_CHECKSUM_H_ + +#include <linux/version.h> +#include_next <net/ip6_checksum.h> + +#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,16 ,0 ) + +static inline __wsum ip6_compute_pseudo (struct sk_buff *skb,int proto) +{ +return ~csum_unfold (csum_ipv6_magic (&ipv6_hdr (skb)->saddr, + &ipv6_hdr (skb)->daddr, + skb->len, proto,0 )); +} + +#endif /* < KERNEL_VERSION(3, 16, 0) */ + +#endif /* _NET_BATMAN_ADV_COMPAT_NET_IP6_CHECKSUM_H_ */
compat-include/net/ipv6.h new file +17 -0
@@ -0,0 +1,17 @@ +#ifndef _NET_BATMAN_ADV_COMPAT_NET_IPV6_H_ +#define _NET_BATMAN_ADV_COMPAT_NET_IPV6_H_ + +#include <linux/version.h> +#include_next <net/ipv6.h> + +#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,3 ,0 ) + +#define ipv6_skip_exthdr (skb, start, nexthdrp, frag_offp) \ + ({ \ + (void)frag_offp; \ + ipv6_skip_exthdr(skb, start, nexthdrp); \ + }) + +#endif /* < KERNEL_VERSION(3, 3, 0) */ + +#endif /* _NET_BATMAN_ADV_COMPAT_NET_IPV6_H_ */
compat-include/net/mld.h new file +52 -0
52 lines not on this page · raw message
compat-sources/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +batman-adv-y += ../../compat-sources/net/core/skbuff.o +batman-adv-y += ../../compat-sources/net/ipv4/igmp.o +batman-adv-y += ../../compat-sources/net/ipv6/mcast_snoop.o
compat-sources/net/core/skbuff.c new file +179 -0
179 lines not on this page · raw message
compat-sources/net/ipv4/igmp.c new file +241 -0
241 lines not on this page · raw message
compat-sources/net/ipv6/mcast_snoop.c new file +216 -0
216 lines not on this page · raw message
net/batman-adv/multicast.c +68 -8
164 lines not on this page · raw message
net/batman-adv/soft-interface.c +2 -0
@@ -206,6 +206,8 @@ static int batadv_interface_tx(struct sk_buff *skb,if (atomic_read (&bat_priv->mesh_state) !=BATADV_MESH_ACTIVE ) goto dropped; +skb_set_network_header (skb,ETH_HLEN ); + soft_iface->trans_start = jiffies; vid =batadv_get_vid (skb,0 ); ethhdr =eth_hdr (skb);
Signature · 1 line
1.7.10.4
I was asked to give some abstract, non-technical explanation for this drastic change to the previous patchsets':
There are conceptual issues with the always-unicast approach for some, maybe rare scenarios.
(One could argue on the technical level though whether we'd care about these issues - the bridge for instance doesn't and has a manual switch as a workaround to change to always-flood for specific bridge ports; and I generally wouldn't care for a Freifunk mesh network either but think I found a "better approach" for less overhead there)
Cheers, Linus
Quoted 70 lines · Linus Lüssing
The last round of multicast patches send to the batman-adv mailinglist to add support for the multicast optimizations in bridged scenarios, too, unfortunately had one major conceptual flaw: It could lead to packet loss. It's not sufficient to have the unicasting of reports implemented on bridge-nodes only. Nodes without bridges need to either unicast them, too or as done with this patch flood them uncoditionally.
The issue is described in detail here:
https://www.open-mesh.org/projects/batman-adv/wiki/Multicast-optimizations-listener-reports
This patch substitutes and greatly simplifies the following patchset:
"batman-adv: Unicasting multicast reports to querier-node only"The reason for doing this is, that I think the disadvantages of this simpler approach noted in the wikipage above (e.g. report overhead in large mesh networks) can be better compensated by segmenting the IGMP/MLD domain via ebtables (drop all queries and reports coming out of bat0 or before entering bat0) and the "
multicast_router" bridge port flag on bat0 (flood all multicast to this bat0 port, let batman-adv deal with the optimizations from here on). Segmenting the IGMP/MLD domain also has the nice advantage of being able to run a querier on every mesh node which therefore is a way more decentral approach.Cheers, Linus
-----
Changelog
v1:
* Removed query snooping and state
* Squashed all three patches into one
* Renamed "batadv_mcast_tvlv_ogm_handler_v1()" to*_v2()
* Added expliciticmpv6.hinclude
* Rebased on top of masterOld changelog of
"batman-adv: Unicasting multicast reports to querier-node only" v6:
* compat: copied copyright headers from original upstream c files
* compat: unified ordering in compat c files:
-> copyright header, then includes, then kernel specific functions
v5:
* Removed RFC tag: Needed exports got merged to net-next and are going to be available with Linux 4.2
* Redid compat solution - now fully backwards compatible down to 2.6.33
v4:
* excluded bridge part from this patchset, they should
hopefully be added to net-next soon
* Added a compat solution (PATCH 3/3)
* Removed Kconfig-depends as by David's suggestion the needed parsing functions for MLD are going to be forced built-ins even if IPv6 is going to be built as a module
* Removed unused variable 'int ret' inbatadv_mcast_is_report_ipv6()
* Adjusted to new folder structure
v3:
* Adding Kconfig-depends and #if's
(so basically adding similar dependancy constraints as the bridge code
has, except that there are no depends if batman-adv gets compiled without multicast optimizations)
-> the case of IPv6=M and batman-adv=y is still impossible if multicast
optimizations are enabled; but I don't see the practical demand for that either - people who use IPv6 as a module will probably also want to use batman-adv as a module
v2:
* various bugfixes (now runtime tested, too - should(tm) work)
* added netdev+bridge mailinglists
Quoted 9 lines · On Sunday 21 June 2015 15:36:17 Linus Lüssing wrote:
With this patch IGMP or MLD reports are always flooded. This is necessary for the upcoming bridge integration:
An IGMPv2/MLDv1 querier does not actively join the multicast group the reports are sent to. Because of this, this would lead to snooping bridges/switches not being able to learn of multicast listeners in the mesh and wrongly shutting down ports for multicast traffic to the mesh, leading to packet loss.
Quoted 3 lines
This patch increments the multicast tvlv version number to 2.
Signed-off-by Linus Lüssing <[email protected]>
After discussing with Linus, I agree that we should use the more simple approach and focus our optimizations effort on actual multicast traffic instead of the reports. I think this approach is much more simpler and easier to debug
- since the multicast subject itself is complex enough on its own.
The patch is pretty much straight forward, most of the code is actually adopted from the Linux kernel. Therefore:
Thank you!
Simon
Quoted 8 lines · On Sunday, June 21, 2015 15:36:17 Linus Lüssing wrote:
With this patch IGMP or MLD reports are always flooded. This is necessary for the upcoming bridge integration:
An IGMPv2/MLDv1 querier does not actively join the multicast group the reports are sent to. Because of this, this would lead to snooping bridges/switches not being able to learn of multicast listeners in the mesh and wrongly shutting down ports for multicast traffic to the mesh, leading to packet loss.
I am not quite clear on what the patch does. It helps to support a feature that is yet to come (upcoming bridge integration) or improves the situation today ?
Quoted 4 lines
/**
*batadv_mcast_forw_mode_check- check for optimized forwarding potential(quoted diff) +0
-0@@ -376,9 +434,11 @@ static int batadv_mcast_forw_mode_check(struct
batadv_priv*bat_priv, caseETH_P_IP:
net/batman-adv/multicast.c static int batadv_mcast_forw_mode_check(struct batadv_priv *bat_priv, · line 444
Quoted 10 lines
net/batman-adv/multicast.c +2
-0return batadv_mcast_forw_mode_check_ipv4 (bat_priv, skb, is_unsnoopable); +#if IS_ENABLED (CONFIG_IPV6 )case ETH_P_IPV6 :return batadv_mcast_forw_mode_check_ipv6 (bat_priv, skb, is_unsnoopable); +#endif default :return -EINVAL ; }
This hunk seems not really related to the patch itself ?
Quoted 9 lines
/**
- *batadv_mcast_tvlv_ogm_handler_v1- process incoming multicast tvlv container + *batadv_mcast_tvlv_ogm_handler_v2- process incoming multicast tvlv container * @bat_priv: the bat priv with all the soft interface information * @orig: theorig_nodeof the ogm
* @flags: flags indicating the tvlv state (seebatadv_tvlv_handler_flags)
* @tvlv_value: tvlv buffer containing the multicast data
* @tvlv_value_len: tvlv buffer length
*/
net/batman-adv/multicast.c static void batadv_mcast_want_ipv6_update(struct batadv_priv *bat_priv, · line 785
Quoted 5 lines
net/batman-adv/multicast.c +1
-1-static void batadv_mcast_tvlv_ogm_handler_v1(struct batadv_priv *bat_priv, +static void batadv_mcast_tvlv_ogm_handler_v2(struct batadv_priv *bat_priv, struct batadv_orig_node *orig, u8 flags, void *tvlv_value,
By removing mcast v1 you effectively are breaking compatibility with all nodes running v1 and require everyone to upgrade to v2. Is there a good reason for that ? The multicast optimizations can't easily work with v1 and v2 ?
By reading your patch it does not become clear why v2 is needed in the first place. The tvlv's content seems to be identical ?
net/batman-adv/soft-interface.c static int batadv_interface_tx(struct sk_buff *skb, · line 213
Quoted 9 lines
net/batman-adv/soft-interface.c +2
-0@@ -206,6 +206,8 @@ static int batadv_interface_tx(struct sk_buff *skb,if (atomic_read (&bat_priv->mesh_state) !=BATADV_MESH_ACTIVE ) goto dropped; +skb_set_network_header (skb,ETH_HLEN ); + soft_iface->trans_start = jiffies; vid =batadv_get_vid (skb,0 ); ethhdr =eth_hdr (skb);
Why is this change part of the patch ?
Cheers,
Marek
Quoted 10 lines · Marek Lindner
Quoted 8 lines · On Sunday, June 21, 2015 15:36:17 Linus Lüssing wrote:
With this patch IGMP or MLD reports are always flooded. This is necessary for the upcoming bridge integration:
An IGMPv2/MLDv1 querier does not actively join the multicast group the reports are sent to. Because of this, this would lead to snooping bridges/switches not being able to learn of multicast listeners in the mesh and wrongly shutting down ports for multicast traffic to the mesh, leading to packet loss.
Quoted 3 lines
I am not quite clear on what the patch does. It helps to support a feature that is yet to come (upcoming bridge integration) or improves the situation today ?
The former. It's not fixing or improving anything for the current implementation.
Quoted 18 lines
Quoted 6 lines
/**
*batadv_mcast_forw_mode_check- check for optimized forwarding potential(quoted diff) +0
-0@@ -376,9 +434,11 @@ static int batadv_mcast_forw_mode_check(struct
batadv_priv*bat_priv, caseETH_P_IP:net/batman-adv/multicast.c static int batadv_mcast_forw_mode_check(struct batadv_priv *bat_priv, · line 444
Quoted 10 lines
net/batman-adv/multicast.c +2
-0return batadv_mcast_forw_mode_check_ipv4 (bat_priv, skb, is_unsnoopable); +#if IS_ENABLED (CONFIG_IPV6 )case ETH_P_IPV6 :return batadv_mcast_forw_mode_check_ipv6 (bat_priv, skb, is_unsnoopable); +#endif default :return -EINVAL ; }This hunk seems not really related to the patch itself ?
I think it's necessary for the new ipv6_mc_check_mld() which isn't there if building a kernel without any IPv6 support.
Quoted 11 lines
Quoted 11 lines
/**
- *batadv_mcast_tvlv_ogm_handler_v1- process incoming multicast tvlv container + *batadv_mcast_tvlv_ogm_handler_v2- process incoming multicast tvlv container * @bat_priv: the bat priv with all the soft interface information * @orig: theorig_nodeof the ogm
* @flags: flags indicating the tvlv state (seebatadv_tvlv_handler_flags)
* @tvlv_value: tvlv buffer containing the multicast data
* @tvlv_value_len: tvlv buffer length
*/
Quoted 8 lines
net/batman-adv/multicast.c static void batadv_mcast_want_ipv6_update(struct batadv_priv *bat_priv, · line 785
Quoted 5 lines
net/batman-adv/multicast.c +1
-1-static void batadv_mcast_tvlv_ogm_handler_v1(struct batadv_priv *bat_priv, +static void batadv_mcast_tvlv_ogm_handler_v2(struct batadv_priv *bat_priv, struct batadv_orig_node *orig, u8 flags, void *tvlv_value,By removing mcast v1 you effectively are breaking compatibility with all nodes running v1 and require everyone to upgrade to v2.
No, no v1 nodes are required to upgrade. v1 and v2 nodes are still able to communicate. v1 nodes (like any pre v1 node) might downgrade the mesh to a mcast-optimizations-disabled state for now though, yes.
Quoted 5 lines
Is there a good reason for that ? The multicast optimizations can't easily work with v1 and v2 ?
By reading your patch it does not become clear why v2 is needed in the first place. The tvlv's content seems to be identical ?
We cannot safely use the multicast optimizations with bridges if there are nodes which do not handle reports properly. The bump isn't needed for any packet changes but the internal, local behaviour of a node.
I haven't heard of anyone using the multicast optimization feature in practice yet (that is, a setup without bridges), so I think it is safe to do a version bump?
Quoted 6 lines
Quoted 6 lines
net/batman-adv/soft-interface.c +0
-0@@ -206,6 +206,8 @@ static int batadv_interface_tx(struct sk_buff *skb,if (atomic_read (&bat_priv->mesh_state) !=BATADV_MESH_ACTIVE ) goto dropped;
Quoted 7 lines
net/batman-adv/soft-interface.c static int batadv_interface_tx(struct sk_buff *skb, · line 213
Quoted 5 lines
net/batman-adv/soft-interface.c +2
-0+skb_set_network_header (skb,ETH_HLEN ); + soft_iface->trans_start = jiffies; vid =batadv_get_vid (skb,0 ); ethhdr =eth_hdr (skb);Why is this change part of the patch ?
Hm, good question :). Need to recheck, I vaguely remember having had issues with the IP header parsing due to unset skb network headers.
Quoted 4 lines
Cheers,
Marek
Cheers, Linus
Quoted 7 lines · On Sunday, June 28, 2015 05:59:14 Linus Lüssing wrote:
Quoted 4 lines
I am not quite clear on what the patch does. It helps to support a feature that is yet to come (upcoming bridge integration) or improves the situation
today ?The former. It's not fixing or improving anything for the current implementation.
If this patch isn't doing anything (for now) maybe it should be merged when it becomes useful ?
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
net/batman-adv/multicast.c +2
-0+#if IS_ENABLED (CONFIG_IPV6 )case ETH_P_IPV6 :return batadv_mcast_forw_mode_check_ipv6 (bat_priv, skb, is_unsnoopable); +#endif default :return -EINVAL ;
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
}
This hunk seems not really related to the patch itself ?
I think it's necessary for the new
ipv6_mc_check_mld()which isn't there if building a kernel without any IPv6 support.
You may want to send a separate patch then ? This change seems unrelated to the rest.
Quoted 6 lines
Quoted 2 lines
By removing mcast v1 you effectively are breaking compatibility with all nodes running v1 and require everyone to upgrade to v2.
No, no v1 nodes are required to upgrade. v1 and v2 nodes are still able to communicate. v1 nodes (like any pre v1 node) might downgrade the mesh to a mcast-optimizations-disabled state for now though, yes.
I do understand that 'normal' packet exchange is not affected. However, the TVLVs were introduced with the intend of maintaining best possible compatibility with future versions. With the first tvlv version bump we already require upgrading everyone or compatibility is already broken ? Is there really nothing we can do ? v2 could at least be compatible to v1 ?
Quoted 8 lines
We cannot safely use the multicast optimizations with bridges if there are nodes which do not handle reports properly. The bump isn't needed for any packet changes but the internal, local behaviour of a node.
I haven't heard of anyone using the multicast optimization feature in practice yet (that is, a setup without bridges), so I think it is safe to do a version bump?
A version bump for a feature which does not do anything useful yet (see my initial question) ? How likely is it that we will need another version bump by the time this feature does become useful ?
Quoted 3 lines
Hm, good question :). Need to recheck, I vaguely remember having had issues with the IP header parsing due to unset skb network headers.
If it is related to this patch please add a comment. The change is non- obvious.
Cheers,
Marek
Quoted 11 lines · Marek Lindner
Quoted 7 lines · On Sunday, June 28, 2015 05:59:14 Linus Lüssing wrote:
Quoted 4 lines
I am not quite clear on what the patch does. It helps to support a feature that is yet to come (upcoming bridge integration) or improves the situation
today ?The former. It's not fixing or improving anything for the current implementation.
If this patch isn't doing anything (for now) maybe it should be merged when it becomes useful ?
Hm, good point. The intention was to keep things in small chunks for easy reviewing. With the unicasted reports approach there were more lines of code changed and an actual (but broken / insufficient) change / "improvement". Now it got rather small with no practical advantage so far. So yes, could be added to the multicast-bridge patchset.
Quoted 18 lines
Quoted 18 lines
Quoted 17 lines
Quoted 5 lines
net/batman-adv/multicast.c +1
-0+#if IS_ENABLED (CONFIG_IPV6 )case ETH_P_IPV6 :net/batman-adv/multicast.c static int batadv_mcast_forw_mode_check(struct batadv_priv *bat_priv, · line 444
Quoted 10 lines
net/batman-adv/multicast.c +1
-0return batadv_mcast_forw_mode_check_ipv6 (bat_priv, skb, is_unsnoopable); +#endif default :return -EINVAL ; }This hunk seems not really related to the patch itself ?
Quoted 5 lines
Quoted 2 lines
I think it's necessary for the new
ipv6_mc_check_mld()which isn't there if building a kernel without any IPv6 support.You may want to send a separate patch then ? This change seems unrelated to the rest.
The use of ipv6_mc_check_mld() is added in this patch. I think it's necessary in this patch?
I'm not quite sure if I understand. If I move this "#if" and the one around the function definition to a seperate patch after this one then I get for net-next (with the version number in the Makefile changed to 4.2) with CONFIG_IPV6 disabled:
"WARNING: "ipv6_mc_check_mld" [/home/tux/dev/batman-adv-t_x/net/batman-adv/batman-adv.ko] undefined!"
The "#if"'s aren't necessary prior this patch, so making an extra patch before this patch here doesn't make sense to me either. The "#if's" become necessary with the changes introduced in this patch.
Quoted 9 lines
Quoted 8 lines
Quoted 4 lines
By removing mcast v1 you effectively are breaking compatibility with all nodes running v1 and require everyone to upgrade to v2.
No, no v1 nodes are required to upgrade. v1 and v2 nodes are still able to communicate. v1 nodes (like any pre v1 node) might downgrade the mesh to a mcast-optimizations-disabled state for now though, yes.
Quoted 5 lines
I do understand that 'normal' packet exchange is not affected. However, the TVLVs were introduced with the intend of maintaining best possible compatibility with future versions. With the first tvlv version bump we already require upgrading everyone or compatibility is already broken ? Is there really nothing we can do ? v2 could at least be compatible to v1 ?
Hm, you mean while v1 nodes would downgrade a bridged v2 setup, whether we could at least keep things compatible in a non-bridged setup with a mix of v1 and v2 nodes?
The alternative to bumping the version number would be to introduce another flag into the mcast tvlv and keep counters and lists similar to the num_disabled or want_* ones. So maybe about 80 more lines of code and additional state and complexity to maintain.
My current feeling is that these 80 lines of code would never be used / useful for someone:
The only benefit of this approach arises if someone is using a non-bridged mesh of v2014.2.0 to v2015.0 without any v2014.4.0 or v2014.1.0 nodes. For one thing there aren't many people using non-bridged setups I think. For another these few people probably don't rely on the multicast feature since without bridges there usually isn't that much multicast traffic to safe with the current feature.
Quoted 7 lines
Quoted 7 lines
We cannot safely use the multicast optimizations with bridges if there are nodes which do not handle reports properly. The bump isn't needed for any packet changes but the internal, local behaviour of a node.
Quoted 7 lines
Quoted 3 lines
I haven't heard of anyone using the multicast optimization feature in practice yet (that is, a setup without bridges), so I think it is safe to do a version bump?
A version bump for a feature which does not do anything useful yet (see my initial question) ? How likely is it that we will need another version bump by the time this feature does become useful ?
Hopefully none ;). The next revision for the multicast bridge integration is ready for submission in the branch linus/multicast-bridge.
Of coures, if more people would like to dig into the conceptual part of IGMP/MLD and the planned integration with batman-adv as described on the wiki, I'd definitely welcome that.
But I'm starting to get a good feeling about this :P. The concept isn't easy but it's now been thought about and discussed a lot between Simon and me over the last two years.
I'm also angry with myself that I missed this issue before, but I think it wasn't really a trivial one either. On the plus side, it made me really paranoid and I probably got over the whole concept and the wiki pages another ten times to make sure there isn't another one year set back because of having missed something. So I can't say with 100% certainity that something else was missed and could introduce another version bump but I'm also quite confident, that it's rather unlikely that we might have missed another such issue.
Quoted 8 lines
Quoted 5 lines
Hm, good question :). Need to recheck, I vaguely remember having had issues with the IP header parsing due to unset skb network headers.
If it is related to this patch please add a comment. The change is non- obvious.
Oki doki.
Quoted 3 lines
Cheers,
Marek
Cheers, Linus
Quoted 4 lines · Linus Lüssing
The alternative to bumping the version number would be to introduce another flag into the mcast tvlv and keep counters and lists similar to the
num_disabledor want_* ones. So maybe about 80 more lines of code and additional state and complexity to maintain.
Another alternative I just had to think about would be to register both a v1 and v2 TVLV container while only registering a handler for v2. That'd add just two or four extra lines of code with the same result. The disadvantage would be a few bytes extra overhead for dragging a v1 TVLV in the OGMs along.
Actually, I think I'd kinda like that as it has a reasonable benefit-to-cost ratio. What do others think?
(And maybe such legacy multicast v1 TVLV could then safely be obsoleted/removed in four years or after evaluating whether someone still needs it.)