Skip to contentSkip to conversation

pull request for net-next: batman-adv 2025-05-09

PATCH Applied Simon Wunderlich 2 participants 7 messages May 9, 2025 – May 10, 2025

Subsystems (3)
lore
Share & tools
lore

Simon Wunderlich

author maintainer
#0 lore raw

cover pull request for net-next: batman-adv 2025-05-09

Hi Jakub, hi David,

here is a cleanup pull request of batman-adv to go into net-next.

Please pull or let me know of any problem!

Thank you,
Simon

The following changes since commit 61f96e684edd28ca40555ec49ea1555df31ba619:

Merge tag 'net-6.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net (2025-04-04 09:15:35 -0700)

are available in the Git repository at:

git://git.open-mesh.org/linux-merge.git tags/batadv-next-pullrequest-20250509

for you to fetch changes up to 4e1ccc8e52e5eb3a072d7e4faecd80c6f326bfd2:

batman-adv: Drop unused net_namespace.h include (2025-04-13 11:11:33 +0200)

----------------------------------------------------------------
This cleanup patchset includes the following patches:

- bump version strings, by Simon Wunderlich

- constify and move broadcast addr definition, Matthias Schiffer

- remove start/stop queue function for mesh-iface, by Antonio Quartulli

- switch to crc32 header for crc32c, by Sven Eckelmann

- drop unused net_namespace.h include, by Sven Eckelmann

----------------------------------------------------------------
Antonio Quartulli (1):
batman-adv: no need to start/stop queue on mesh-iface

Matthias Schiffer (1):
batman-adv: constify and move broadcast addr definition

Simon Wunderlich (1):
batman-adv: Start new development cycle

Sven Eckelmann (2):
batman-adv: Switch to crc32 header for crc32c
batman-adv: Drop unused net_namespace.h include

 net/batman-adv/main.c              |  4 +---
 net/batman-adv/main.h              |  3 +--
 net/batman-adv/mesh-interface.c    | 15 ---------------
 net/batman-adv/send.c              |  4 +++-
 net/batman-adv/translation-table.c |  2 +-
 5 files changed, 6 insertions(+), 22 deletions(-)
author maintainer
#1 lore raw

PATCH 1/5 batman-adv: Start new development cycle

This version will contain all the (major or even only minor) changes for Linux 6.16.

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
index 67af435ee04e..4b5ce8972848 100644
@@ -13,7 +13,7 @@
 #define BATADV_DRIVER_DEVICE "batman-adv"
 
 #ifndef BATADV_SOURCE_VERSION
-#define BATADV_SOURCE_VERSION "2025.1"
+#define BATADV_SOURCE_VERSION "2025.2"
 #endif
 
 /* B.A.T.M.A.N. parameters */
Signature · 1 line
2.39.5
#2 lore raw

Re: [PATCH net-next 1/5] batman-adv: Start new development cycle

This series was applied to netdev/net-next.git (main) by Simon Wunderlich <[email protected]>:

Hello:

This series was applied to netdev/net-next.git (main) by Simon Wunderlich <[email protected]>:

Quoted 8 lines · On Fri, 9 May 2025 11:10:37 +0200 you wrote:

This version will contain all the (major or even only minor) changes for Linux 6.16.

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:
- [net-next,1/5] batman-adv: Start new development cycle

    https://git.kernel.org/netdev/net-next/c/4a1cff317d95
  - [net-next,2/5] batman-adv: constify and move broadcast addr definition
    https://git.kernel.org/netdev/net-next/c/d699628dae07
  - [net-next,3/5] batman-adv: no need to start/stop queue on mesh-iface
    https://git.kernel.org/netdev/net-next/c/8a7bb74a79d4
  - [net-next,4/5] batman-adv: Switch to crc32 header for crc32c
    https://git.kernel.org/netdev/net-next/c/a608f11d3a3b
  - [net-next,5/5] batman-adv: Drop unused net_namespace.h include
    https://git.kernel.org/netdev/net-next/c/4e1ccc8e52e5

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
author maintainer
#3 lore raw

PATCH 2/5 batman-adv: constify and move broadcast addr definition

In reply to Simon Wunderlich

From: Matthias Schiffer <[email protected]>

The variable is used only once and is read-only. Make it a const local variable.

---
 net/batman-adv/main.c | 2 --
 net/batman-adv/main.h | 1 -
 net/batman-adv/send.c | 4 +++-
 3 files changed, 3 insertions(+), 4 deletions(-)
net/batman-adv/main.c +0 -2
index a08132888a3d..e41f816f0887 100644
@@ -69,8 +69,6 @@ unsigned int batadv_hardif_generation;
 static int (*batadv_rx_handler[256])(struct sk_buff *skb,
 				     struct batadv_hard_iface *recv_if);
 
-unsigned char batadv_broadcast_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
-
 struct workqueue_struct *batadv_event_workqueue;
 
 static void batadv_recv_handler_init(void);
net/batman-adv/main.h +0 -1
index 4b5ce8972848..692109be2210 100644
@@ -235,7 +235,6 @@ static inline int batadv_print_vid(unsigned short vid)
 extern struct list_head batadv_hardif_list;
 extern unsigned int batadv_hardif_generation;
 
-extern unsigned char batadv_broadcast_addr[];
 extern struct workqueue_struct *batadv_event_workqueue;
 
 int batadv_mesh_init(struct net_device *mesh_iface);
net/batman-adv/send.c +3 -1
index 735ac8077821..9d72f4f15b3d 100644
@@ -124,7 +124,9 @@ int batadv_send_skb_packet(struct sk_buff *skb,
 int batadv_send_broadcast_skb(struct sk_buff *skb,
 			      struct batadv_hard_iface *hard_iface)
 {
-	return batadv_send_skb_packet(skb, hard_iface, batadv_broadcast_addr);
+	static const u8 broadcast_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
+
+	return batadv_send_skb_packet(skb, hard_iface, broadcast_addr);
 }
 
 /**
Signature · 1 line
2.39.5
author maintainer
#4 lore raw

PATCH 3/5 batman-adv: no need to start/stop queue on mesh-iface

In reply to Simon Wunderlich

From: Antonio Quartulli <[email protected]>

The batman-adv mesh-iface is flagged with IFF_NO_QUEUE, therefore there is no reason to start/stop any queue in ndo_open/close.

---
 net/batman-adv/mesh-interface.c | 14 --------------
 1 file changed, 14 deletions(-)
net/batman-adv/mesh-interface.c +0 -14
index 59e7b5aacbc9..e48b683a033f 100644
@@ -77,18 +77,6 @@ int batadv_skb_head_push(struct sk_buff *skb, unsigned int len)
 	return 0;
 }
 
-static int batadv_interface_open(struct net_device *dev)
-{
-	netif_start_queue(dev);
-	return 0;
-}
-
-static int batadv_interface_release(struct net_device *dev)
-{
-	netif_stop_queue(dev);
-	return 0;
-}
-
 /**
  * batadv_sum_counter() - Sum the cpu-local counters for index 'idx'
  * @bat_priv: the bat priv with all the mesh interface information
@@ -890,8 +878,6 @@ static int batadv_meshif_slave_del(struct net_device *dev,
 
 static const struct net_device_ops batadv_netdev_ops = {
 	.ndo_init = batadv_meshif_init_late,
-	.ndo_open = batadv_interface_open,
-	.ndo_stop = batadv_interface_release,
 	.ndo_get_stats = batadv_interface_stats,
 	.ndo_vlan_rx_add_vid = batadv_interface_add_vid,
 	.ndo_vlan_rx_kill_vid = batadv_interface_kill_vid,
Signature · 1 line
2.39.5
author maintainer
#5 lore raw

PATCH 4/5 batman-adv: Switch to crc32 header for crc32c

In reply to Simon Wunderlich

From: Sven Eckelmann <[email protected]>

The crc32c() function was moved in commit 8df36829045a ("lib/crc32:
standardize on crc32c() name for Castagnoli CRC32") from linux/crc32c.h to linux/crc32.h. The former is just an include file which redirects to the latter.

Avoid the indirection by directly including the correct header file.

---
 net/batman-adv/main.c              | 2 +-
 net/batman-adv/translation-table.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
net/batman-adv/main.c +1 -1
index e41f816f0887..c0bc75513355 100644
@@ -11,7 +11,7 @@
 #include <linux/build_bug.h>
 #include <linux/byteorder/generic.h>
 #include <linux/container_of.h>
-#include <linux/crc32c.h>
+#include <linux/crc32.h>
 #include <linux/device.h>
 #include <linux/errno.h>
 #include <linux/gfp.h>
net/batman-adv/translation-table.c +1 -1
index 4a3165920de1..8d0e04e770cb 100644
@@ -14,7 +14,7 @@
 #include <linux/cache.h>
 #include <linux/compiler.h>
 #include <linux/container_of.h>
-#include <linux/crc32c.h>
+#include <linux/crc32.h>
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/etherdevice.h>
Signature · 1 line
2.39.5
author maintainer
#6 lore raw

PATCH 5/5 batman-adv: Drop unused net_namespace.h include

In reply to Simon Wunderlich

From: Sven Eckelmann <[email protected]>

Since commit 69c7be1b903f ("rtnetlink: Pack newlink() params into struct"), .newlink() doesn't use the struct net parameter. A type definition from net_namespace.h is no longer needed.

---
 net/batman-adv/mesh-interface.c | 1 -
 1 file changed, 1 deletion(-)
net/batman-adv/mesh-interface.c +0 -1
index e48b683a033f..5bbc366f974d 100644
@@ -36,7 +36,6 @@
 #include <linux/stddef.h>
 #include <linux/string.h>
 #include <linux/types.h>
-#include <net/net_namespace.h>
 #include <net/netlink.h>
 #include <uapi/linux/batadv_packet.h>
 #include <uapi/linux/batman_adv.h>
Signature · 1 line
2.39.5