Skip to contentSkip to conversation

batctl: add switch for setting multicast_fanout

PATCH Superseded Linus Lüssing 2 participants 2 messages Feb 14, 2019 Kbuild

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 batctl: add switch for setting multicast_fanout

This patch adds an option for the new multicast_fanout setting in batman-adv.

---
 Makefile           |   1 +
 README.rst         |  10 +++++
 batman_adv.h       |   7 ++++
 man/batctl.8       |   5 +++
 multicast_fanout.c | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 138 insertions(+)
 create mode 100644 multicast_fanout.c
Makefile +1 -0
index 4d8b709..15bc3ec 100755
@@ -69,6 +69,7 @@ $(eval $(call add_command,log,y))
 $(eval $(call add_command,loglevel,y))
 $(eval $(call add_command,mcast_flags,y))
 $(eval $(call add_command,multicast_mode,y))
+$(eval $(call add_command,multicast_fanout,y))
 $(eval $(call add_command,nc_nodes,y))
 $(eval $(call add_command,neighbors,y))
 $(eval $(call add_command,network_coding,y))
README.rst +10 -0
index 4c0f544..a3a61ac 100644
@@ -478,6 +478,16 @@ Usage::
   batctl multicast_mode|mm [0|1]
 
 
+batctl multicast_fanout
+=====================
+
+display or modify the multicast fanout setting
+
+Usage::
+
+  batctl multicast_fanout|mo [fanout]
+
+
 batctl mcast_flags
 ==================
 
batman_adv.h +7 -0
index 9b12d2a..2f956e6 100644
@@ -491,6 +491,13 @@ enum batadv_nl_attrs {
 	 */
 	BATADV_ATTR_THROUGHPUT_OVERRIDE,
 
+	/**
+	 * @BATADV_ATTR_MULTICAST_FANOUT: defines the maximum number of packet
+	 * copies that may be generated for a multicast-to-unicast conversion.
+	 * Once this limit is exceeded distribution will fall back to broadcast.
+	 */
+	BATADV_ATTR_MULTICAST_FANOUT,
+
 	/* add attributes above here, update the policy in netlink.c */
 
 	/**
man/batctl.8 +5 -0
index ed8e71f..92c0e32 100644
@@ -105,6 +105,11 @@ disable network coding.
 If no parameter is given the current multicast mode setting is displayed. Otherwise the parameter is used to enable or
 disable multicast optimizations (i.e. disabling means always sending own multicast frames via classic flooding).
 .br
+.IP "\fBmulticast_fanout\fP|\fBmo\fP [\fBfanout\fP]"
+If no parameter is given the current multicast fanout setting is displayed. Otherwise the parameter is used to set
+the multicast fanout. The multicast fanout defines the maximum number of packet copies that may be generated for a
+multicast-to-unicast conversion. Once this limit is exceeded distribution will fall back to broadcast.
+.br
 .IP "\fBloglevel\fP|\fBll\fP [\fBlevel\fP[ \fBlevel\fP[ \fBlevel\fP]] \fB...\fP]"
 If no parameter is given the current log level settings are displayed otherwise the parameter(s) is/are used to set the log
 level. Level 'none' disables all verbose logging. Level 'batman' enables messages related to routing / flooding / broadcasting.
multicast_fanout.c new file +115 -0

115 lines not on this page · raw message

Signature · 1 line
2.11.0
#1 lore raw
Quoted 4 lines · On Thursday, 14 February 2019 13.54.15 CET Linus Lüssing wrote:

This patch adds an option for the new multicast_fanout setting in batman-adv.

Quoted 8 lines
---
 Makefile           |   1 +
 README.rst         |  10 +++++
 batman_adv.h       |   7 ++++
 man/batctl.8       |   5 +++
 multicast_fanout.c | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 138 insertions(+)
 create mode 100644 multicast_fanout.c

change in event.c is missing to parse the mcast "config" group messages with BATADV_ATTR_MULTICAST_FANOUT.

BATADV_ATTR_MULTICAST_FANOUT was not added to netlink.c's batadv_netlink_policy

Makefile $(eval $(call add_command,log,y)) · line 75

Quoted 12 lines
Makefile +1 -0
index 4d8b709..15bc3ec 100755
@@ -69,6 +69,7 @@ $(eval $(call add_command,log,y))
 $(eval $(call add_command,loglevel,y))
 $(eval $(call add_command,mcast_flags,y))
 $(eval $(call add_command,multicast_mode,y))
+$(eval $(call add_command,multicast_fanout,y))
 $(eval $(call add_command,nc_nodes,y))
 $(eval $(call add_command,neighbors,y))
 $(eval $(call add_command,network_coding,y))

multicast_fanout comes before multicast_mode (alphabetical order)

README.rst Usage:: · line 484

Quoted 12 lines
README.rst +4 -0
index 4c0f544..a3a61ac 100644
@@ -478,6 +478,16 @@ Usage::
   batctl multicast_mode|mm [0|1]
 
 
+batctl multicast_fanout
+=====================
+
+display or modify the multicast fanout setting

[...]

This is not valid restructuredtext:

    $ rst2html README.rst > /dev/null
    README.rst:482: (WARNING/2) Title underline too short.
    batctl multicast_fanout
    =====================
    README.rst:482: (WARNING/2) Title underline too short.
    
    batctl multicast_fanout
    =====================

[...]

README.rst

Quoted 2 lines
README.rst +2 -0
+static struct settings_data batctl_settings_multicast_fanout = {
+	.sysfs_name = "multicast_fanout",

There should be no sysfs_name for this (see discussion in batman-adv patch).

Kind regards,
Sven