As mentioned earlier, the netlink config restructuring in batctl will be
splitted in multiple steps. The first step was already merged and the
patch series for the netlink interface in batman-adv was just posted.
The batman-adv weren't directly rejected by Jiro and thus I've started
to convert all settings to netlink while still allowing sysfs as fallback.
v5:
===
* dropped attribute BATADV_ATTR_MULTICAST_MODE for multicast_mode and replaced
it with (basically inversed) BATADV_ATTR_MULTICAST_FORCEFLOOD_ENABLED
* Add _ENABLED Postfix for boolean attributes:
- BATADV_ATTR_AGGREGATED_OGMS_ENABLED
- BATADV_ATTR_AP_ISOLATION_ENABLED
- BATADV_ATTR_BONDING_ENABLED
- BATADV_ATTR_BRIDGE_LOOP_AVOIDANCE_ENABLED
- BATADV_ATTR_DISTRIBUTED_ARP_TABLE_ENABLED
- BATADV_ATTR_FRAGMENTATION_ENABLED
- BATADV_ATTR_NETWORK_CODING_ENABLED
v4:
===
* last patch (which adds the netlink implementation of the settings commands)
was splitted in 16 separate patches
* Cc the (most likely) responsible developers for each setting to more
directly ask them for feedback
v3:
===
* fix kernel-doc in batman_adv.h
* add three patches to use the netlink interface with the already existing
setting commands
v2:
===
* drop of generic config command
* reimplementation of the event command
Kind regards,
Sven
Sven Eckelmann (20):
batctl: Add support for config mcast group in event monitor
batctl: Don't allocate new buffer for vlan parent device
batctl: Automatically translate vlan to mesh_iface
batctl: Add settings_data hooks for netlink integration
batctl: Parse the arguments for gw_mode
batctl: Add netlink simple query helper
batctl: Support generic netlink for gw_mode command
batctl: Support generic netlink for loglevel command
batctl: Support generic netlink for isolation_mark command
batctl: Support generic netlink for orig_interval command
batctl: Add helper to read/write boolean configuration values
batctl: Support generic netlink for aggregation command
batctl: Support generic netlink for ap_isolation command
batctl: Support generic netlink for bonding command
batctl: Support generic netlink for bridge_loop_avoidance command
batctl: Support generic netlink for distributed_arp_table command
batctl: Support generic netlink for fragmentation command
batctl: Support generic netlink for multicast_mode command
batctl: Support generic netlink for network_coding command
batctl: Drop settings_data param lists
aggregation.c | 46 ++++-
ap_isolation.c | 68 ++++++-
batman_adv.h | 190 +++++++++++++++++-
bonding.c | 45 ++++-
bridge_loop_avoidance.c | 46 ++++-
distributed_arp_table.c | 46 ++++-
event.c | 234 ++++++++++++++++++++++
fragmentation.c | 46 ++++-
functions.c | 160 +++++++++++++---
functions.h | 23 ++-
gateways.c | 10 +-
gw_mode.c | 416 +++++++++++++++++++++++++++++++---------
isolation_mark.c | 123 +++++++++++-
loglevel.c | 138 ++++++++++---
main.c | 10 +-
main.h | 6 +-
mcast_flags.c | 10 +-
multicast_mode.c | 66 ++++++-
netlink.c | 108 ++++++++++-
netlink.h | 2 +
network_coding.c | 46 ++++-
orig_interval.c | 84 +++++++-
originators.c | 10 +-
routing_algo.c | 1 -
sys.c | 219 ++++++++++++++++-----
sys.h | 25 ++-
26 files changed, 1922 insertions(+), 256 deletions(-)
--
2.20.1
Hi,
Jiri Pirko called the batman-adv configuration interface a while back "a
huge mistake" [1] and suggested genl as alternative. The first
reimplementation [2] (based on the team/devlink design) was rejected. This
second implementation is now using a nl80211-like design. The objects which
can now be modified/queried are:
* mesh/soft-interface (BATADV_CMD_GET_MESH/BATADV_CMD_SET_MESH)
* slave/hard-interface (BATADV_CMD_GET_HARDIF/BATADV_CMD_SET_HARDIF)
* vlan (BATADV_CMD_GET_VLAN/BATADV_CMD_SET_VLAN)
Such a set messages automatically triggers a *_SET_* "reply" via the config
multicast group. The same behavior was also added to the sysfs interface.
Thanks to Linus and Simon for their feedback. The discussed changes were now
integrated.
v5:
===
* renamed main functions to add attributes
- batadv_netlink_mesh_put_ap_isolation ->
batadv_netlink_mesh_fill_ap_isolation
- batadv_netlink_mesh_put -> batadv_netlink_mesh_fill
- batadv_netlink_hardif_put -> batadv_netlink_hardif_fill
- batadv_netlink_vlan_put -> batadv_netlink_vlan_fill
* dropped attribute BATADV_ATTR_MULTICAST_MODE_ENABLED and replaced it with
(basically inversed) BATADV_ATTR_MULTICAST_FORCEFLOOD_ENABLED
v4:
===
Incorporate various feedback from
* Linus Luessing:
- Fix typos/spelling/grammar problems:
+ "already allow" -> "already allows"
+ "mesh mesh" -> "mesh"
+ "safed" -> "saved"
- Let batadv_get_softif_from_info actually return net_device instead of
net_device private data (batadv_priv)
- store genl_info_net(info) in temporary variable to avoid line breaks
in function parameters
- document that batadv_get_*_from_info functions increase the reference
counter of the returned object
- directly drop reference counter to hard_dev net_device in
batadv_get_hardif_from_info instead of doing that in batadv_post_doit
- fix NULL pointer deref of primary_if when batadv device doesn't have
any slave device
- rewrite user_ptr[1] flags precheck in batadv_pre_doit to count the
number of set bits (to only allow one of the flags which use
user_ptr[1])
* Jiri Pirko:
- Add _ENABLED Postfix for boolean attributes:
+ BATADV_ATTR_AGGREGATED_OGMS_ENABLED
+ BATADV_ATTR_AP_ISOLATION_ENABLED
+ BATADV_ATTR_BONDING_ENABLED
+ BATADV_ATTR_BRIDGE_LOOP_AVOIDANCE_ENABLED
+ BATADV_ATTR_DISTRIBUTED_ARP_TABLE_ENABLED
+ BATADV_ATTR_FRAGMENTATION_ENABLED
+ BATADV_ATTR_MULTICAST_MODE_ENABLED
+ BATADV_ATTR_NETWORK_CODING_ENABLED
v3:
===
* correctly assign kernel-doc for BATADV_GW_MODE_CLIENT
* fix validation check for gw.sel_class
* fix setting of BATADV_ATTR_ORIG_INTERVAL
* Cc the (most likely) responsible developers for each setting to more
directly ask them for feedback
v2:
===
* rewrite everything in a more nl80211-like message/attribute format.
Kind regards,
Sven
[1] https://www.open-mesh.org/issues/300
[2] https://patchwork.open-mesh.org/cover/17610/
Sven Eckelmann (19):
batman-adv: Move common genl doit code pre/post hooks
batman-adv: Prepare framework for mesh genl config
batman-adv: Prepare framework for hardif genl config
batman-adv: Prepare framework for vlan genl config
batman-adv: Add aggregated_ogms mesh genl configuration
batman-adv: Add ap_isolation mesh/vlan genl configuration
batman-adv: Add bonding mesh genl configuration
batman-adv: Add bridge_loop_avoidance mesh genl configuration
batman-adv: Add distributed_arp_table mesh genl configuration
batman-adv: Add fragmentation mesh genl configuration
batman-adv: Add gateway mesh genl configuration
batman-adv: Add hop_penalty mesh genl configuration
batman-adv: Add log_level mesh genl configuration
batman-adv: Add multicast forceflood mesh genl configuration
batman-adv: Add network_coding mesh genl configuration
batman-adv: Add orig_interval mesh genl configuration
batman-adv: Add elp_interval hardif genl configuration
batman-adv: Add throughput_override hardif genl configuration
batman-adv: Trigger genl notification on sysfs config change
include/uapi/linux/batman_adv.h | 190 +++++-
net/batman-adv/gateway_client.c | 1 -
net/batman-adv/gateway_common.c | 1 +
net/batman-adv/gateway_common.h | 6 -
net/batman-adv/netlink.c | 1080 +++++++++++++++++++++++++++----
net/batman-adv/netlink.h | 6 +
net/batman-adv/soft-interface.c | 2 +-
net/batman-adv/sysfs.c | 64 +-
8 files changed, 1203 insertions(+), 147 deletions(-)
--
2.20.1
checkpatch.pl complains since commit 45e417022023 ("scripts/spelling.txt:
add more spellings to spelling.txt") about an additional spelling mistake
in batman-adv:`
CHECK: 'reseved' may be misspelled - perhaps 'reserved'?
#232: FILE: include/uapi/linux/batadv_packet.h:232:
+ * @flags: reseved for routing relevant flags - currently always 0
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
---
include/uapi/linux/batadv_packet.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/uapi/linux/batadv_packet.h b/include/uapi/linux/batadv_packet.h
index 7eb2936a..c99336f4 100644
--- a/include/uapi/linux/batadv_packet.h
+++ b/include/uapi/linux/batadv_packet.h
@@ -229,7 +229,7 @@ struct batadv_ogm_packet {
* @packet_type: batman-adv packet type, part of the general header
* @version: batman-adv protocol version, part of the general header
* @ttl: time to live for this packet, part of the general header
- * @flags: reseved for routing relevant flags - currently always 0
+ * @flags: reserved for routing relevant flags - currently always 0
* @seqno: sequence number
* @orig: originator mac address
* @tvlv_len: length of the appended tvlv buffer (in bytes)
--
2.20.1
Hi
I am having a problem getting alfred retrieve info from other nodes. I am
running openwrt and alfred 2018.0.
I am able to start the alfred server with no errors both from boot and the
command line.
root@OpenWrt:~# /etc/init.d/alfred restart
/etc/init.d/alfred: waiting 30 secs for br-lan address...
/etc/init.d/alfred: starting alfred
/etc/init.d/alfred: starting batadv-vis
I can see it with ps
4290 root 816 S /usr/sbin/alfred -i br-lan -m -b bat0
I can issue a set and then a receive and I see the value I set but only
locally. It does not get any info from the other nodes in my network. They
are all running alfred servers as master.
I have added a firewall rule to open the port.
If I have 2 nodes running alfred and I run tcpdump -i br-lan udp port
16962 - I see packets from the other node:
16:21:49.279086 IP6 fe80::2d0:12ff:fe00:f0c7.16962 > ip6-allnodes.16962:
UDP, length 4
16:21:51.907852 IP6 fe80::2d0:12ff:fe2e:f1bd.16962 > ip6-allnodes.16962:
UDP, length 4
16:21:59.282603 IP6 fe80::2d0:12ff:fe00:f0c7.16962 > ip6-allnodes.16962:
UDP, length 4
16:22:01.907227 IP6 fe80::2d0:12ff:fe2e:f1bd.16962 > ip6-allnodes.16962:
UDP, length 4
16:22:09.285498 IP6 fe80::2d0:12ff:fe00:f0c7.16962 > ip6-allnodes.16962:
UDP, length 4
16:22:11.919876 IP6 fe80::2d0:12ff:fe2e:f1bd.16962 > ip6-allnodes.16962:
UDP, length 4
16:22:19.288912 IP6 fe80::2d0:12ff:fe00:f0c7.16962 > ip6-allnodes.16962:
UDP, length 4
16:22:21.916609 IP6 fe80::2d0:12ff:fe2e:f1bd.16962 > ip6-allnodes.16962:
UDP, length 4
I think these might be the master announcements but when I issue an alfred
-r # - I do not see any new messages in the tcpdump.
Output of netstat -tunpl shows alfred
4290/alfred
udp 0 0 fe80::2d0:12ff:fe00:f0c7:16962
:::* 4290/alfred
This is the output of ip a s br-lan
12: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state
UP group default qlen 1000
link/ether 00:d0:12:00:f0:c7 brd ff:ff:ff:ff:ff:ff
inet 192.168.2.91/24 brd 192.168.2.255 scope global br-lan
valid_lft forever preferred_lft forever
inet6 fd5b:763:2819::1/64 scope global noprefixroute
valid_lft forever preferred_lft forever
inet6 fe80::2d0:12ff:fe00:f0c7/64 scope link
valid_lft forever preferred_lft forever
Ive rebuilt alfred, tried different versions from the repo, nothing works.
I really would appreciate any help.
Beth
Hi,
Jiri Pirko called the batman-adv configuration interface a while back "a
huge mistake" [1] and suggested genl as alternative. The first
reimplementation [2] (based on the team/devlink design) was rejected. This
second implementation is now using a nl80211-like design. The objects which
can now be modified/queried are:
* mesh/soft-interface (BATADV_CMD_GET_MESH/BATADV_CMD_SET_MESH)
* slave/hard-interface (BATADV_CMD_GET_HARDIF/BATADV_CMD_SET_HARDIF)
* vlan (BATADV_CMD_GET_VLAN/BATADV_CMD_SET_VLAN)
Such a set messages automatically triggers a *_SET_* "reply" via the config
multicast group. The same behavior was also added to the sysfs interface.
I would like to ask the other developers to check whether their
configuration values are represented correctly. And please also check
whether the current implementation might collide with some other features
which you might have in your pipeline.
Unfortunately, Linus Luessing is the only batman-adv developer who provided
feedback.
There were also two topics which were not yet really discussed and thus
these requests (from Linus) were not yet implemented:
* convert BATADV_ATTR_MULTICAST_MODE_ENABLED to an u32 and let don't handle
it like a boolean. Instead use it to select how multicast traffic has to
be handled:
- 0: ignore multicast optimization and just flood it like broadcast
traffic
- 1: enabled multicast optimization
- 2: undefined but also some kind of multicast optimization
- 3: undefined but also some kind of multicast of optimization
- ...
* convert BATADV_ATTR_AGGREGATION_OGM_ENABLED to u32 and use it
to mark which type of traffic should be aggregated:
- bit 0: enable aggregation of OGM(2)s
- bit 1: yet undefined packet type which allows some kind of aggregation
- bit 2: yet undefined packet type which allows some kind of aggregation
- ...
v4:
===
Incorporate various feedback from
* Linus Luessing:
- Fix typos/spelling/grammar problems:
+ "already allow" -> "already allows"
+ "mesh mesh" -> "mesh"
+ "safed" -> "saved"
- Let batadv_get_softif_from_info actually return net_device instead of
net_device private data (batadv_priv)
- store genl_info_net(info) in temporary variable to avoid line breaks
in function parameters
- document that batadv_get_*_from_info functions increase the reference
counter of the returned object
- directly drop reference counter to hard_dev net_device in
batadv_get_hardif_from_info instead of doing that in batadv_post_doit
- fix NULL pointer deref of primary_if when batadv device doesn't have
any slave device
- rewrite user_ptr[1] flags precheck in batadv_pre_doit to count the
number of set bits (to only allow one of the flags which use
user_ptr[1])
* Jiri Pirko:
- Add _ENABLED Postfix for boolean attributes:
+ BATADV_ATTR_AGGREGATED_OGMS_ENABLED
+ BATADV_ATTR_AP_ISOLATION_ENABLED
+ BATADV_ATTR_BONDING_ENABLED
+ BATADV_ATTR_BRIDGE_LOOP_AVOIDANCE_ENABLED
+ BATADV_ATTR_DISTRIBUTED_ARP_TABLE_ENABLED
+ BATADV_ATTR_FRAGMENTATION_ENABLED
+ BATADV_ATTR_MULTICAST_MODE_ENABLED
+ BATADV_ATTR_NETWORK_CODING_ENABLED
v3:
===
* correctly assign kernel-doc for BATADV_GW_MODE_CLIENT
* fix validation check for gw.sel_class
* fix setting of BATADV_ATTR_ORIG_INTERVAL
* Cc the (most likely) responsible developers for each setting to more
directly ask them for feedback
v2:
===
* rewrite everything in a more nl80211-like message/attribute format.
Kind regards,
Sven
[1] https://www.open-mesh.org/issues/300
[2] https://patchwork.open-mesh.org/cover/17610/
Sven Eckelmann (19):
batman-adv: Move common genl doit code pre/post hooks
batman-adv: Prepare framework for mesh genl config
batman-adv: Prepare framework for hardif genl config
batman-adv: Prepare framework for vlan genl config
batman-adv: Add aggregated_ogms mesh genl configuration
batman-adv: Add ap_isolation mesh/vlan genl configuration
batman-adv: Add bonding mesh genl configuration
batman-adv: Add bridge_loop_avoidance mesh genl configuration
batman-adv: Add distributed_arp_table mesh genl configuration
batman-adv: Add fragmentation mesh genl configuration
batman-adv: Add gateway mesh genl configuration
batman-adv: Add hop_penalty mesh genl configuration
batman-adv: Add log_level mesh genl configuration
batman-adv: Add multicast_mode mesh genl configuration
batman-adv: Add network_coding mesh genl configuration
batman-adv: Add orig_interval mesh genl configuration
batman-adv: Add elp_interval hardif genl configuration
batman-adv: Add throughput_override hardif genl configuration
batman-adv: Trigger genl notification on sysfs config change
include/uapi/linux/batman_adv.h | 189 +++++-
net/batman-adv/gateway_client.c | 1 -
net/batman-adv/gateway_common.c | 1 +
net/batman-adv/gateway_common.h | 6 -
net/batman-adv/netlink.c | 1080 +++++++++++++++++++++++++++----
net/batman-adv/netlink.h | 6 +
net/batman-adv/soft-interface.c | 2 +-
net/batman-adv/sysfs.c | 64 +-
8 files changed, 1202 insertions(+), 147 deletions(-)
--
2.20.1
On Wednesday, 16 January 2019 11.26.53 CET Thomas Gleixner wrote:
> The SuperH boot code files use a magic format for the SPDX identifier
> comment:
>
> LIST "SPDX-License-Identifier: .... "
>
> The trailing quotation mark is not stripped before the token parser is
> invoked and causes the scan to fail. Handle it gracefully.
[...]
This patch introduces a false positive when checking files with an ANSI-C
style /* SPDX-License-Identifier: .... */ comment line.
$ ./scripts/checkpatch.pl -q -f include/linux/bug.h
WARNING: 'SPDX-License-Identifier: GPL-2.0 */' is not supported in LICENSES/...
#1: FILE: include/linux/bug.h:1:
+/* SPDX-License-Identifier: GPL-2.0 */
total: 0 errors, 1 warnings, 79 lines checked
checkpatch.pl is already stripping the "/* " prefix and only sends the
remaining "SPDX-License-Identifier: GPL-2.0 */" via stdin to
scripts/spdxcheck.py. Thus the newly introduced check
> + # Remove trailing comment closure
> + if line.startswith('/*'):
> + expr = expr.rstrip('*/').strip()
doesn't match and thus the code doesn't remove the " */" at the end of the
line.
Kind regards,
Sven
On Wednesday, 6 February 2019 15.39.14 CET Martin Weinelt via B.A.T.M.A.N wrote:
> Consume the skb to avoid leaking memory.
>
> Fixes: 1fd1ce2d383f ("batman-adv: Snoop DHCPACKs for DAT")
> Signed-off-by: Martin Weinelt <martin(a)linuxlounge.net>
Good catch. I've modified the commit message to make it better
understandable and to describe the actual problem in more detail.
Kind regards,
Sven
Hi David,
here are some bugfixes which we would like to see integrated into net.
Please pull or let me know of any problem!
Thank you,
Simon
The following changes since commit b71acb0e372160167bf6d5500b88b30b52ccef6e:
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 (2018-12-27 13:53:32 -0800)
are available in the git repository at:
git://git.open-mesh.org/linux-merge.git tags/batadv-net-for-davem-20190201
for you to fetch changes up to 7d652669b61d702c6e62a39579d17f6881670ab6:
batman-adv: release station info tidstats (2019-01-25 09:04:41 +0100)
----------------------------------------------------------------
Here are some batman-adv bugfixes:
- Avoid WARN to report incorrect configuration, by Sven Eckelmann
- Fix mac header position setting, by Sven Eckelmann
- Fix releasing station statistics, by Felix Fietkau
----------------------------------------------------------------
Felix Fietkau (1):
batman-adv: release station info tidstats
Sven Eckelmann (2):
batman-adv: Avoid WARN on net_device without parent in netns
batman-adv: Force mac header to start of data on xmit
net/batman-adv/bat_v_elp.c | 3 +++
net/batman-adv/hard-interface.c | 5 +++--
net/batman-adv/soft-interface.c | 2 ++
3 files changed, 8 insertions(+), 2 deletions(-)