pull request for net-next: batman-adv 2022-03-02
Subsystems (3)
Simon Wunderlich
maintainercover pull request for net-next: batman-adv 2022-03-02
Hi Jakub, hi David,
here is a little cleanup pull request of batman-adv to go into net-next.
Please pull or let me know of any problem!
There might be a small merge conflict between the net and net-next pull requests which I both send today, specifically those two commits:
* (batadv/net) 690bb6fb64f5 ("batman-adv: Request iflink once in batadv-on-batadv check")
* (batadv/net-next) 6ee3c393eeb7 ("batman-adv: Demote batadv-on-batadv skip error message")
They should be resolved like this:
net/batman-adv/hard-interface.c +0 -6
@@ -167,13 +167,7 @@return false;/* recurse over the parent device */ -<<<<<<< - parent_dev =__dev_get_by_index ((struct net *)parent_net, -dev_get_iflink (net_dev)); -======= parent_dev =__dev_get_by_index ((struct net *)parent_net, iflink); -/* if we got a NULL parent_dev there is something broken.. */ ->>>>>>>if (!parent_dev) {pr_warn ("Cannot find parent device. Skipping batadv-on-batadv check for %s\n" , net_dev->name);
Thank you,
Simon
The following changes since commit e783362eb54cd99b2cac8b3a9aeac942e6f6ac07:
Linux 5.17-rc1 (2022-01-23 10:12:53 +0200)
are available in the Git repository at:
git://git.open-mesh.org/linux-merge.git tags/batadv-next-pullrequest-20220302
for you to fetch changes up to 6ee3c393eeb7d16a3c228c4fa23913b76c7e7df3:
batman-adv: Demote batadv-on-batadv skip error message (2022-03-02 09:00:17 +0100)
----------------------------------------------------------------
This cleanup patchset includes the following patches:
- bump version strings, by Simon Wunderlich
- Remove redundant 'flush_workqueue()' calls, by Christophe JAILLET
- Migrate to linux/container_of.h, by Sven Eckelmann
- Demote batadv-on-batadv skip error message, by Sven Eckelmann
----------------------------------------------------------------
Christophe JAILLET (1):
batman-adv: Remove redundant 'flush_workqueue()' calls
Simon Wunderlich (1):
batman-adv: Start new development cycle
Sven Eckelmann (2):
batman-adv: Migrate to linux/container_of.h
batman-adv: Demote batadv-on-batadv skip error message
net/batman-adv/bat_iv_ogm.c | 2 +- net/batman-adv/bat_v_elp.c | 2 +- net/batman-adv/bat_v_ogm.c | 2 +- net/batman-adv/bridge_loop_avoidance.c | 1 + net/batman-adv/distributed-arp-table.c | 2 +- net/batman-adv/gateway_client.c | 1 + net/batman-adv/hard-interface.c | 6 +++--- net/batman-adv/main.c | 2 +- net/batman-adv/main.h | 2 +- net/batman-adv/multicast.c | 1 + net/batman-adv/network-coding.c | 2 +- net/batman-adv/originator.c | 2 +- net/batman-adv/send.c | 2 +- net/batman-adv/soft-interface.c | 2 +- net/batman-adv/tp_meter.c | 2 +- net/batman-adv/translation-table.c | 2 +- net/batman-adv/tvlv.c | 2 +- 17 files changed, 19 insertions(+), 16 deletions(-)
Simon Wunderlich
maintainerPATCH 1/4 batman-adv: Start new development cycle
This version will contain all the (major or even only minor) changes for Linux 5.18.
The version number isn't a semantic version number with major and minor information. It is just encoding the year of the expected publishing as Linux -rc1 and the number of published versions this year (starting at 0).
--- net/batman-adv/main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/batman-adv/main.h +1 -1
@@ -13,7 +13,7 @@#define BATADV_DRIVER_DEVICE "batman-adv"#ifndef BATADV_SOURCE_VERSION -#define BATADV_SOURCE_VERSION "2022.0" +#define BATADV_SOURCE_VERSION "2022.1"#endif /* B.A.T.M.A.N. parameters */
Signature · 1 line
2.30.2
Re: [PATCH 1/4] batman-adv: Start new development cycle
This series was applied to netdev/net-next.git (master) by Simon Wunderlich <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (master) by Simon Wunderlich <[email protected]>:
Quoted 8 lines · On Wed, 2 Mar 2022 17:35:19 +0100 you wrote:
This version will contain all the (major or even only minor) changes for Linux 5.18.
The version number isn't a semantic version number with major and minor information. It is just encoding the year of the expected publishing as Linux -rc1 and the number of published versions this year (starting at 0).
[...]
Here is the summary with links:
- [1/4] batman-adv: Start new development cycle
https://git.kernel.org/netdev/net-next/c/94ea9392e113 - [2/4] batman-adv: Remove redundant 'flush_workqueue()' calls https://git.kernel.org/netdev/net-next/c/c138f67ad472 - [3/4] batman-adv: Migrate to linux/container_of.h https://git.kernel.org/netdev/net-next/c/eb7da4f17dfc - [4/4] batman-adv: Demote batadv-on-batadv skip error message https://git.kernel.org/netdev/net-next/c/6ee3c393eeb7
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
Simon Wunderlich
maintainerPATCH 2/4 batman-adv: Remove redundant 'flush_workqueue()' calls
In reply to Simon WunderlichFrom: Christophe JAILLET <[email protected]>
'destroy_workqueue()' already drains the queue before destroying it, so there is no need to flush it explicitly.
Remove the redundant 'flush_workqueue()' calls.
This was generated with coccinelle:
@@
expression E;
@@
- flush_workqueue(E); destroy_workqueue(E);
--- net/batman-adv/main.c | 1 - 1 file changed, 1 deletion(-)
net/batman-adv/main.c +0 -1
@@ -132,7 +132,6 @@ static void __exit batadv_exit(void)rtnl_link_unregister (&batadv_link_ops);unregister_netdevice_notifier (&batadv_hard_if_notifier); -flush_workqueue (batadv_event_workqueue);destroy_workqueue (batadv_event_workqueue); batadv_event_workqueue =NULL ;
Signature · 1 line
2.30.2
Simon Wunderlich
maintainerPATCH 3/4 batman-adv: Migrate to linux/container_of.h
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
The commit d2a8ebbf8192 ("kernel.h: split out container_of() and typeof_member() macros") introduced a new header for the container_of related macros from (previously) linux/kernel.h.
--- net/batman-adv/bat_iv_ogm.c | 2 +- net/batman-adv/bat_v_elp.c | 2 +- net/batman-adv/bat_v_ogm.c | 2 +- net/batman-adv/bridge_loop_avoidance.c | 1 + net/batman-adv/distributed-arp-table.c | 2 +- net/batman-adv/gateway_client.c | 1 + net/batman-adv/hard-interface.c | 2 +- net/batman-adv/main.c | 1 + net/batman-adv/multicast.c | 1 + net/batman-adv/network-coding.c | 2 +- net/batman-adv/originator.c | 2 +- net/batman-adv/send.c | 2 +- net/batman-adv/soft-interface.c | 2 +- net/batman-adv/tp_meter.c | 2 +- net/batman-adv/translation-table.c | 2 +- net/batman-adv/tvlv.c | 2 +- 16 files changed, 16 insertions(+), 12 deletions(-)
net/batman-adv/bat_iv_ogm.c +1 -1
@@ -13,13 +13,13 @@#include <linux/bug.h> #include <linux/byteorder/generic.h> #include <linux/cache.h> +#include <linux/container_of.h> #include <linux/errno.h> #include <linux/etherdevice.h> #include <linux/gfp.h> #include <linux/if_ether.h> #include <linux/init.h> #include <linux/jiffies.h> -#include <linux/kernel.h> #include <linux/kref.h> #include <linux/list.h> #include <linux/lockdep.h>
net/batman-adv/bat_v_elp.c +1 -1
@@ -10,13 +10,13 @@#include <linux/atomic.h> #include <linux/bitops.h> #include <linux/byteorder/generic.h> +#include <linux/container_of.h> #include <linux/errno.h> #include <linux/etherdevice.h> #include <linux/ethtool.h> #include <linux/gfp.h> #include <linux/if_ether.h> #include <linux/jiffies.h> -#include <linux/kernel.h> #include <linux/kref.h> #include <linux/minmax.h> #include <linux/netdevice.h>
net/batman-adv/bat_v_ogm.c +1 -1
@@ -9,12 +9,12 @@#include <linux/atomic.h> #include <linux/byteorder/generic.h> +#include <linux/container_of.h> #include <linux/errno.h> #include <linux/etherdevice.h> #include <linux/gfp.h> #include <linux/if_ether.h> #include <linux/jiffies.h> -#include <linux/kernel.h> #include <linux/kref.h> #include <linux/list.h> #include <linux/lockdep.h>
net/batman-adv/bridge_loop_avoidance.c +1 -0
@@ -10,6 +10,7 @@#include <linux/atomic.h> #include <linux/byteorder/generic.h> #include <linux/compiler.h> +#include <linux/container_of.h> #include <linux/crc16.h> #include <linux/errno.h> #include <linux/etherdevice.h>
net/batman-adv/distributed-arp-table.c +1 -1
@@ -11,6 +11,7 @@#include <linux/atomic.h> #include <linux/bitops.h> #include <linux/byteorder/generic.h> +#include <linux/container_of.h> #include <linux/errno.h> #include <linux/etherdevice.h> #include <linux/gfp.h>
@@ -20,7 +21,6 @@#include <linux/in.h> #include <linux/ip.h> #include <linux/jiffies.h> -#include <linux/kernel.h> #include <linux/kref.h> #include <linux/list.h> #include <linux/netlink.h>
net/batman-adv/gateway_client.c +1 -0
@@ -9,6 +9,7 @@#include <linux/atomic.h> #include <linux/byteorder/generic.h> +#include <linux/container_of.h> #include <linux/errno.h> #include <linux/etherdevice.h> #include <linux/gfp.h>
net/batman-adv/hard-interface.c +1 -1
@@ -9,11 +9,11 @@#include <linux/atomic.h> #include <linux/byteorder/generic.h> +#include <linux/container_of.h> #include <linux/gfp.h> #include <linux/if.h> #include <linux/if_arp.h> #include <linux/if_ether.h> -#include <linux/kernel.h> #include <linux/kref.h> #include <linux/limits.h> #include <linux/list.h>
net/batman-adv/main.c +1 -0
@@ -9,6 +9,7 @@#include <linux/atomic.h> #include <linux/build_bug.h> #include <linux/byteorder/generic.h> +#include <linux/container_of.h> #include <linux/crc32c.h> #include <linux/device.h> #include <linux/errno.h>
net/batman-adv/multicast.c +1 -0
@@ -11,6 +11,7 @@#include <linux/bitops.h> #include <linux/bug.h> #include <linux/byteorder/generic.h> +#include <linux/container_of.h> #include <linux/errno.h> #include <linux/etherdevice.h> #include <linux/gfp.h>
net/batman-adv/network-coding.c +1 -1
@@ -11,6 +11,7 @@#include <linux/bitops.h> #include <linux/byteorder/generic.h> #include <linux/compiler.h> +#include <linux/container_of.h> #include <linux/errno.h> #include <linux/etherdevice.h> #include <linux/gfp.h>
@@ -19,7 +20,6 @@#include <linux/init.h> #include <linux/jhash.h> #include <linux/jiffies.h> -#include <linux/kernel.h> #include <linux/kref.h> #include <linux/list.h> #include <linux/lockdep.h>
net/batman-adv/originator.c +1 -1
@@ -8,11 +8,11 @@#include "main.h" #include <linux/atomic.h> +#include <linux/container_of.h> #include <linux/errno.h> #include <linux/etherdevice.h> #include <linux/gfp.h> #include <linux/jiffies.h> -#include <linux/kernel.h> #include <linux/kref.h> #include <linux/list.h> #include <linux/lockdep.h>
net/batman-adv/send.c +1 -1
@@ -10,13 +10,13 @@#include <linux/atomic.h> #include <linux/bug.h> #include <linux/byteorder/generic.h> +#include <linux/container_of.h> #include <linux/errno.h> #include <linux/etherdevice.h> #include <linux/gfp.h> #include <linux/if.h> #include <linux/if_ether.h> #include <linux/jiffies.h> -#include <linux/kernel.h> #include <linux/kref.h> #include <linux/list.h> #include <linux/netdevice.h>
net/batman-adv/soft-interface.c +1 -1
@@ -11,6 +11,7 @@#include <linux/byteorder/generic.h> #include <linux/cache.h> #include <linux/compiler.h> +#include <linux/container_of.h> #include <linux/cpumask.h> #include <linux/errno.h> #include <linux/etherdevice.h>
@@ -19,7 +20,6 @@#include <linux/if_ether.h> #include <linux/if_vlan.h> #include <linux/jiffies.h> -#include <linux/kernel.h> #include <linux/kref.h> #include <linux/list.h> #include <linux/lockdep.h>
net/batman-adv/tp_meter.c +1 -1
@@ -12,13 +12,13 @@#include <linux/byteorder/generic.h> #include <linux/cache.h> #include <linux/compiler.h> +#include <linux/container_of.h> #include <linux/err.h> #include <linux/etherdevice.h> #include <linux/gfp.h> #include <linux/if_ether.h> #include <linux/init.h> #include <linux/jiffies.h> -#include <linux/kernel.h> #include <linux/kref.h> #include <linux/kthread.h> #include <linux/limits.h>
net/batman-adv/translation-table.c +1 -1
@@ -13,6 +13,7 @@#include <linux/byteorder/generic.h> #include <linux/cache.h> #include <linux/compiler.h> +#include <linux/container_of.h> #include <linux/crc32c.h> #include <linux/errno.h> #include <linux/etherdevice.h>
@@ -21,7 +22,6 @@#include <linux/init.h> #include <linux/jhash.h> #include <linux/jiffies.h> -#include <linux/kernel.h> #include <linux/kref.h> #include <linux/list.h> #include <linux/lockdep.h>
net/batman-adv/tvlv.c +1 -1
@@ -7,10 +7,10 @@#include "main.h" #include <linux/byteorder/generic.h> +#include <linux/container_of.h> #include <linux/etherdevice.h> #include <linux/gfp.h> #include <linux/if_ether.h> -#include <linux/kernel.h> #include <linux/kref.h> #include <linux/list.h> #include <linux/lockdep.h>
Signature · 1 line
2.30.2
Simon Wunderlich
maintainerPATCH 4/4 batman-adv: Demote batadv-on-batadv skip error message
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
The error message "Cannot find parent device" was shown for users of macvtap (on batadv devices) whenever the macvtap was moved to a different netns. This happens because macvtap doesn't provide an implementation for rtnl_link_ops->get_link_net.
The situation for which this message is printed is actually not an error but just a warning that the optional sanity check was skipped. So demote the message from error to warning and adjust the text to better explain what happened.
--- net/batman-adv/hard-interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/batman-adv/hard-interface.c +2 -2
@@ -165,9 +165,9 @@ static bool batadv_is_on_batman_iface(const struct net_device *net_dev)/* recurse over the parent device */ parent_dev =__dev_get_by_index ((struct net *)parent_net,dev_get_iflink (net_dev)); -/* if we got a NULL parent_dev there is something broken.. */ if (!parent_dev) { -pr_err ("Cannot find parent device\n" ); +pr_warn ("Cannot find parent device. Skipping batadv-on-batadv check for %s\n" , + net_dev->name);return false; }
Signature · 1 line
2.30.2