[PATCH v4 0/5] Implementation of a Stateless Multicast Packet Type
by Linus Lüssing
Hi,
The following patchset implements a stateless, TVLV capable batman-adv
multicast packet type.
The new batman-adv multicast packet type allows to contain several
originator destination MAC addresses within a TVLV. Routers on the way will
potentially split the batman-adv multicast packet and adjust its tracker
TVLV contents.
Routing decisions are still based on the selected BATMAN IV or BATMAN V
routing algorithm. So this new batman-adv multicast packet type retains
the same loop-free properties.
The purpose of this new packet type is to allow to forward an IP
multicast packet with less transmissions / overhead than the
multicast-via-multiple-unicasts approach. Or to reach a lot more
destinations (currently up to 196, depending on the payload size, see
Wiki documentation for details) than with the default multicast fanout
for the via-unicasts approach.
This will allow using applications like mDNS again in several Freifunk
communities. And with less transmissions will also make more bulky
multicast applications, like media streaming (to an assessable amount of
receivers) a lot more feasible.
This approach is way simpler than the original multicast (tracker) packet
approach we envisioned years ago. As it involves no maintenance of an
extra, state based multicast routing table. However the TVLV capability
should allow to extend things later, to split control and data plane a bit
more for instance, to further increase the number of destinations, to
further reduce overhead.
A compact overview can be found in the Wiki here, including limitations:
https://www.open-mesh.org/projects/batman-adv/wiki/Multicast-Packet-Type
Regards, Linus
___
Changelog v4:
* PATCH 4/5:
* add missing include for linux/types.h in multicast.h
* add missing kerneldoc for @bat_priv in batadv_mcast_forw_push_dest()
and batadv_mcast_forw_push_tvlvs()
* use sizeof_field(type, field) instead of sizeof(((type *)0)->field)
in batadv_mcast_forw_push_dest()
* PATCH 5/5:
* rename num_dests_remove to num_dests_reduce in
batadv_mcast_forw_shrink_align_offse() to fix kerneldocs and for
consistency
* fix typo in kerneldoc in batadv_mcast_forw_shrink_update_headers()
-> @num_dest_reduce -> @num_dests_reduce
* use sizeof_field(type, field) instead of sizeof(((type *)0)->field)
in batadv_mcast_forw_shrink_align_offset()
Changelog v3:
* PATCH 1/5:
* remove now obsolete includes
* PATCH 2/5:
* fix batadv_tvlv_handler_register() in network-coding.c
* add missing include for linux/skbuff.h
* move variable declarations out of the switch case
in batadv_tvlv_call_handler()
* PATCH 3/5:
* remove unnecessary include of multicast.h in routing.c
* add a few missing includes to multicast_forw.c
(linux/byteorder/generic.h, linux/errno.h, linux/gfp.h, linux/stddef.h
uapi/linux/batadv_packet.h, multicast.h)
* PATCH 4/5:
* add missing rcu_read_unlock() in error case before returning in
batadv_mcast_forw_push_dests_list()
* remove unnecessary include of soft-interface.h in multicast_forw.c
* add a few missing includes to multicast_forw.c
(linux/bug.h, linux/build_bug.h, linux/limits.h, linux/rculist.h,
linux/rcupdate.h, linux/string.h)
* make batadv_mcast_forw_mode_by_count() static
* fix return types in the declaration of
batadv_mcast_forw_packet_hdrlen() and batadv_mcast_forw_push()
in multicast.h
* fix typo in commit message: "that the are capable of"
-> "that the*y* are capable of"
* PATCH 5/5:
* make batadv_mcast_forw_shrink_pack_dests() adhere to 80 characters
per line for consistency
* add a "continue" statement after the jump label in
batadv_mcast_forw_shrink_pack_dests() to silence the sparse error
"error: label at end of compound statement"
Changelog v2:
* Add "[PATCH v2 0/5]" prefix to title of cover letter, so that
Patchwork can hopefully find it - no other changes
6 days, 23 hours
using alfred (or other means) to collect link data
by dan
I'm looking for a way to collect link data between nodes. My
google-fu has failed me on how to get node-to-node data like latency
or throughput etc. Is there any model built in to batman-adv/alfred
to poll this data? I only really finding the batvis data which is
just returning metric.
I'm mostly wanting to see how traffic is flowing, where links are
being more heavily used especially if those are not shortest paths
(suggests I have something to fix) and to keep track of a sort of high
water mark to metric ratio. ie, this link has done 260Mbps with the
link metric <=1.2 in the last 48 hours and it's currently doing
105Mbps at 1.08 metric.
my current plan is to run scripts to find 1 hop neighbors and either
so an arp-scan or find IP and ping directly on a schedule and store
that in alfred or just push it up to my database but this is a little
brute-forcy considering batman-adv is doing some of this work to
create the route metric in the first place.
Any advice appreciated. Thanks.
1 month
[PATCH] build_test: don't warn about "Macro argument reuse" in multicast_forw.c
by Linus Lüssing
It's tricky to avoid reusing an argument in a for-each like macro. This is
to silence the following warning:
CHECK: Macro argument reuse 'num_dests' - possible side-effects?
#789: FILE: net/batman-adv/multicast_forw.c:35:
+#define batadv_mcast_forw_tracker_for_each_dest(dest, num_dests) \
+ for (; num_dests; num_dests--, (dest) += ETH_ALEN)
CHECK: Macro argument reuse 'num_dests' - possible side-effects?
#792: FILE: net/batman-adv/multicast_forw.c:38:
+#define batadv_mcast_forw_tracker_for_each_dest_rev(dest, num_dests) \
+ for (; num_dests; num_dests--, (dest) -= ETH_ALEN)
Later, once < 5.18 is out of our compat range we can rely on C99 syntax
and use variable declarations inside a for loop, readd the check and
rewrite the macro to something like this:
#define batadv_mcast_forw_tracker_for_each_dest(dest, num_dests) \
for (typeof(num_dests) __batadv_forw_num_dests = num_dests; \
*__batadv_forw_num_dests; \
(*__batadv_forw_num_dests)--, (dest) += ETH_ALEN)
Signed-off-by: Linus Lüssing <linus.luessing(a)c0d3.blue>
---
checkstuff.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/checkstuff.sh b/checkstuff.sh
index 207652ce4fbe..be49709dcb3b 100755
--- a/checkstuff.sh
+++ b/checkstuff.sh
@@ -191,7 +191,7 @@ test_checkpatch()
continue
fi
- if [ "${fname}" = "log.h" ]; then
+ if [ "${fname}" = "log.h" -o "${fname}" = "multicast_forw.c" ]; then
cp_extra_params="${cp_extra_params} --ignore MACRO_ARG_REUSE"
fi
--
2.39.0
1 month, 1 week
[PATCH v3 0/5] Implementation of a Stateless Multicast Packet Type
by Linus Lüssing
Hi,
The following patchset implements a stateless, TVLV capable batman-adv
multicast packet type.
The new batman-adv multicast packet type allows to contain several
originator destination MAC addresses within a TVLV. Routers on the way will
potentially split the batman-adv multicast packet and adjust its tracker
TVLV contents.
Routing decisions are still based on the selected BATMAN IV or BATMAN V
routing algorithm. So this new batman-adv multicast packet type retains
the same loop-free properties.
The purpose of this new packet type is to allow to forward an IP
multicast packet with less transmissions / overhead than the
multicast-via-multiple-unicasts approach. Or to reach a lot more
destinations (currently up to 196, depending on the payload size, see
Wiki documentation for details) than with the default multicast fanout
for the via-unicasts approach.
This will allow using applications like mDNS again in several Freifunk
communities. And with less transmissions will also make more bulky
multicast applications, like media streaming (to an assessable amount of
receivers) a lot more feasible.
This approach is way simpler than the original multicast (tracker) packet
approach we envisioned years ago. As it involves no maintenance of an
extra, state based multicast routing table. However the TVLV capability
should allow to extend things later, to split control and data plane a bit
more for instance, to further increase the number of destinations, to
further reduce overhead.
A compact overview can be found in the Wiki here, including limitations:
https://www.open-mesh.org/projects/batman-adv/wiki/Multicast-Packet-Type
Regards, Linus
___
Changelog v3:
* PATCH 1/5:
* remove now obsolete includes
* PATCH 2/5:
* fix batadv_tvlv_handler_register() in network-coding.c
* add missing include for linux/skbuff.h
* move variable declarations out of the switch case
in batadv_tvlv_call_handler()
* PATCH 3/5:
* remove unnecessary include of multicast.h in routing.c
* add a few missing includes to multicast_forw.c
(linux/byteorder/generic.h, linux/errno.h, linux/gfp.h, linux/stddef.h
uapi/linux/batadv_packet.h, multicast.h)
* PATCH 4/5:
* add missing rcu_read_unlock() in error case before returning in
batadv_mcast_forw_push_dests_list()
* remove unnecessary include of soft-interface.h in multicast_forw.c
* add a few missing includes to multicast_forw.c
(linux/bug.h, linux/build_bug.h, linux/limits.h, linux/rculist.h,
linux/rcupdate.h, linux/string.h)
* make batadv_mcast_forw_mode_by_count() static
* fix return types in the declaration of
batadv_mcast_forw_packet_hdrlen() and batadv_mcast_forw_push()
in multicast.h
* fix typo in commit message: "that the are capable of"
-> "that the*y* are capable of"
* PATCH 5/5:
* make batadv_mcast_forw_shrink_pack_dests() adhere to 80 characters
per line for consistency
* add a "continue" statement after the jump label in
batadv_mcast_forw_shrink_pack_dests() to silence the sparse error
"error: label at end of compound statement"
Changelog v2:
* Add "[PATCH v2 0/5]" prefix to title of cover letter, so that
Patchwork can hopefully find it - no other changes
1 month, 1 week
batman-adv: Drop prandom.h includes
by Sven Eckelmann
The commit a15d3f3c1c2a ("batman-adv: use get_random_u32_below() instead of
deprecated function") replaced the prandom.h function prandom_u32_max with
the random.h function get_random_u32_below. There is no need to still
include prandom.h.
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
diff --git a/compat-include/linux/prandom.h b/compat-include/linux/prandom.h
deleted file mode 100644
index dc227e61f95167a86432e862796db7905f7034c2..0000000000000000000000000000000000000000
--- a/compat-include/linux/prandom.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/* Copyright (C) B.A.T.M.A.N. contributors:
- *
- * Marek Lindner, Simon Wunderlich
- *
- * This file contains macros for maintaining compatibility with older versions
- * of the Linux kernel.
- */
-
-#ifndef _NET_BATMAN_ADV_COMPAT_LINUX_PRANDOM_H_
-#define _NET_BATMAN_ADV_COMPAT_LINUX_PRANDOM_H_
-
-#include <linux/version.h>
-#if LINUX_VERSION_IS_GEQ(5, 8, 1) || \
- (LINUX_VERSION_IS_GEQ(4, 9, 233) && LINUX_VERSION_IS_LESS(4, 10, 0)) || \
- (LINUX_VERSION_IS_GEQ(4, 14, 193) && LINUX_VERSION_IS_LESS(4, 15, 0)) || \
- (LINUX_VERSION_IS_GEQ(4, 19, 138) && LINUX_VERSION_IS_LESS(4, 20, 0)) || \
- (LINUX_VERSION_IS_GEQ(5, 4, 57) && LINUX_VERSION_IS_LESS(5, 5, 0)) || \
- (LINUX_VERSION_IS_GEQ(5, 7, 14) && LINUX_VERSION_IS_LESS(5, 8, 0))
-#include_next <linux/prandom.h>
-#else
-#include <linux/random.h>
-#endif
-
-#endif /* _NET_BATMAN_ADV_COMPAT_LINUX_PRANDOM_H_ */
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c
index 114ee5da261f4410d207a76a357163aad6d1783f..828fb393ee94a31e8715b0b157b4c39b6337b19d 100644
--- a/net/batman-adv/bat_iv_ogm.c
+++ b/net/batman-adv/bat_iv_ogm.c
@@ -27,7 +27,6 @@
#include <linux/netdevice.h>
#include <linux/netlink.h>
#include <linux/pkt_sched.h>
-#include <linux/prandom.h>
#include <linux/printk.h>
#include <linux/random.h>
#include <linux/rculist.h>
diff --git a/net/batman-adv/bat_v_elp.c b/net/batman-adv/bat_v_elp.c
index f9a58fb5442efc051e6f1bad6814f269752b7de7..acff565849ae91f4c0cf54d7299ed76ecb2c6ced 100644
--- a/net/batman-adv/bat_v_elp.c
+++ b/net/batman-adv/bat_v_elp.c
@@ -21,7 +21,6 @@
#include <linux/minmax.h>
#include <linux/netdevice.h>
#include <linux/nl80211.h>
-#include <linux/prandom.h>
#include <linux/random.h>
#include <linux/rculist.h>
#include <linux/rcupdate.h>
diff --git a/net/batman-adv/bat_v_ogm.c b/net/batman-adv/bat_v_ogm.c
index addfd8c4fe959e269b16e2f35b1299354ff4aea2..96e027364dddd30472fed8fe7e0a3aaa5cc8cda1 100644
--- a/net/batman-adv/bat_v_ogm.c
+++ b/net/batman-adv/bat_v_ogm.c
@@ -21,7 +21,6 @@
#include <linux/minmax.h>
#include <linux/mutex.h>
#include <linux/netdevice.h>
-#include <linux/prandom.h>
#include <linux/random.h>
#include <linux/rculist.h>
#include <linux/rcupdate.h>
diff --git a/net/batman-adv/network-coding.c b/net/batman-adv/network-coding.c
index bf29fba4dde5940ad03b6ed925257cdd825f57e4..5e1f422b3a94b119746a6b3b5cf64182951e8eb3 100644
--- a/net/batman-adv/network-coding.c
+++ b/net/batman-adv/network-coding.c
@@ -25,7 +25,6 @@
#include <linux/lockdep.h>
#include <linux/net.h>
#include <linux/netdevice.h>
-#include <linux/prandom.h>
#include <linux/printk.h>
#include <linux/rculist.h>
#include <linux/rcupdate.h>
1 month, 1 week
[PATCH v2 0/5] Implementation of a Stateless Multicast Packet Type
by Linus Lüssing
Hi,
The following patchset implements a stateless, TVLV capable batman-adv
multicast packet type.
The new batman-adv multicast packet type allows to contain several
originator destination MAC addresses within a TVLV. Routers on the way will
potentially split the batman-adv multicast packet and adjust its tracker
TVLV contents.
Routing decisions are still based on the selected BATMAN IV or BATMAN V
routing algorithm. So this new batman-adv multicast packet type retains
the same loop-free properties.
The purpose of this new packet type is to allow to forward an IP
multicast packet with less transmissions / overhead than the
multicast-via-multiple-unicasts approach. Or to reach a lot more
destinations (currently up to 196, depending on the payload size, see
Wiki documentation for details) than with the default multicast fanout
for the via-unicasts approach.
This will allow using applications like mDNS again in several Freifunk
communities. And with less transmissions will also make more bulky
multicast applications, like media streaming (to an assessable amount of
receivers) a lot more feasible.
This approach is way simpler than the original multicast (tracker) packet
approach we envisioned years ago. As it involves no maintenance of an
extra, state based multicast routing table. However the TVLV capability
should allow to extend things later, to split control and data plane a bit
more for instance, to further increase the number of destinations, to
further reduce overhead.
A compact overview can be found in the Wiki here, including limitations:
https://www.open-mesh.org/projects/batman-adv/wiki/Multicast-Packet-Type
Regards, Linus
---
Changelog v2:
* Add "[PATCH v2 0/5]" prefix to title of cover letter, so that
Patchwork can hopefully find it - no other changes
1 month, 1 week
Implementation of a Stateless Multicast Packet Type
by Linus Lüssing
Hi,
The following patchset implements a stateless, TVLV capable batman-adv
multicast packet type.
The new batman-adv multicast packet type allows to contain several
originator destination MAC addresses within a TVLV. Routers on the way will
potentially split the batman-adv multicast packet and adjust its tracker
TVLV contents.
Routing decisions are still based on the selected BATMAN IV or BATMAN V
routing algorithm. So this new batman-adv multicast packet type retains
the same loop-free properties.
The purpose of this new packet type is to allow to forward an IP
multicast packet with less transmissions / overhead than the
multicast-via-multiple-unicasts approach. Or to reach a lot more
destinations (currently up to 196, depending on the payload size, see
Wiki documentation for details) than with the default multicast fanout
for the via-unicasts approach.
This will allow using applications like mDNS again in several Freifunk
communities. And with less transmissions will also make more bulky
multicast applications, like media streaming (to an assessable amount of
receivers) a lot more feasible.
This approach is way simpler than the original multicast (tracker) packet
approach we envisioned years ago. As it involves no maintenance of an
extra, state based multicast routing table. However the TVLV capability
should allow to extend things later, to split control and data plane a bit
more for instance, to further increase the number of destinations, to
further reduce overhead.
A compact overview can be found in the Wiki here, including limitations:
https://www.open-mesh.org/projects/batman-adv/wiki/Multicast-Packet-Type
Regards, Linus
1 month, 1 week
[PATCH] batman-adv: Check return value
by Artem Chernyshev
Check, if rtnl_link_register() call in batadv_init() was successful
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: a4ac28c0d06a ("batman-adv: Allow to use rntl_link for device creation/deletion")
Signed-off-by: Artem Chernyshev <artem.chernyshev(a)red-soft.ru>
---
net/batman-adv/main.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c
index e8a449915566..04cd9682bd29 100644
--- a/net/batman-adv/main.c
+++ b/net/batman-adv/main.c
@@ -113,7 +113,11 @@ static int __init batadv_init(void)
goto err_create_wq;
register_netdevice_notifier(&batadv_hard_if_notifier);
- rtnl_link_register(&batadv_link_ops);
+ ret = rtnl_link_register(&batadv_link_ops);
+ if (ret) {
+ pr_err("Can't register link_ops\n");
+ goto err_create_wq;
+ }
batadv_netlink_register();
pr_info("B.A.T.M.A.N. advanced %s (compatibility version %i) loaded\n",
--
2.30.3
1 month, 1 week
[RFC PATCH] batman-adv: Drop support for Linux < 4.14
by Sven Eckelmann
The Linux Kernel 4.9 reached its end of life [1] after 6 years. Instead it
is recommended to use at least kernel 4.14. It is also over 5 years
old but still maintained by the stable kernel team. All older kernels
(4.9 - v4.13) will be dropped to reduce the support overhead.
[1] TODO: https://lore.kernel.org/r/XXXX
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
---
README.external.rst | 2 +-
compat-include/linux/build_bug.h | 31 -------------------------
compat-include/linux/netdevice.h | 19 ----------------
compat-include/linux/prandom.h | 1 -
compat-include/linux/skbuff.h | 29 ------------------------
compat-include/linux/timer.h | 34 ----------------------------
compat-include/uapi/linux/if_ether.h | 25 --------------------
compat.h | 10 --------
8 files changed, 1 insertion(+), 150 deletions(-)
delete mode 100644 compat-include/linux/build_bug.h
delete mode 100644 compat-include/linux/timer.h
delete mode 100644 compat-include/uapi/linux/if_ether.h
diff --git a/README.external.rst b/README.external.rst
index 34f3a8d4..e9f00ee0 100644
--- a/README.external.rst
+++ b/README.external.rst
@@ -12,7 +12,7 @@ and as an external module. The external module allows to get
new features without upgrading to a newer kernel version
and to get batman-adv specific bug fixes for kernels that are
not supported anymore. It compiles against and should work
-with Linux 4.9 - 6.1. Supporting older versions is not
+with Linux 4.14 - 6.1. Supporting older versions is not
planned, but it's probably easy to backport it. If you work on a
backport, feel free to contact us. :-)
diff --git a/compat-include/linux/build_bug.h b/compat-include/linux/build_bug.h
deleted file mode 100644
index 8ec79069..00000000
--- a/compat-include/linux/build_bug.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/* Copyright (C) B.A.T.M.A.N. contributors:
- *
- * Marek Lindner, Simon Wunderlich
- *
- * This file contains macros for maintaining compatibility with older versions
- * of the Linux kernel.
- */
-
-#ifndef _NET_BATMAN_ADV_COMPAT_LINUX_BUILD_BUG_H_
-#define _NET_BATMAN_ADV_COMPAT_LINUX_BUILD_BUG_H_
-
-#include <linux/version.h>
-#if LINUX_VERSION_IS_GEQ(4, 13, 0)
-#include_next <linux/build_bug.h>
-#else
-#include <linux/bug.h>
-
-/* Linux 4.9.297 doesn't provide BUILD_BUG_ON anymore in linux/bug.h
- * also identified itself with the version number 4.9.255 when decoding the
- * LINUX_VERSION_CODE. So we have to try to guess now if we need to include
- * linux/build_bug.h based on whether BUILD_BUG_ON is defined or not after
- * including linux/bug.h
- */
-#ifndef BUILD_BUG_ON
-#include_next <linux/build_bug.h>
-#endif
-
-#endif
-
-#endif /* _NET_BATMAN_ADV_COMPAT_LINUX_BUILD_BUG_H_ */
diff --git a/compat-include/linux/netdevice.h b/compat-include/linux/netdevice.h
index eeb31bed..3188ad3d 100644
--- a/compat-include/linux/netdevice.h
+++ b/compat-include/linux/netdevice.h
@@ -20,25 +20,6 @@
#endif /* LINUX_VERSION_IS_LESS(4, 15, 0) */
-#if LINUX_VERSION_IS_LESS(4, 11, 9)
-
-/* work around missing attribute needs_free_netdev and priv_destructor in
- * net_device
- */
-#define ether_setup(dev) \
- void batadv_softif_free2(struct net_device *dev) \
- { \
- batadv_softif_free(dev); \
- free_netdev(dev); \
- } \
- void (*t1)(struct net_device *dev) __attribute__((unused)); \
- bool t2 __attribute__((unused)); \
- ether_setup(dev)
-#define needs_free_netdev destructor = batadv_softif_free2; t2
-#define priv_destructor destructor = batadv_softif_free2; t1
-
-#endif /* LINUX_VERSION_IS_LESS(4, 11, 9) */
-
#if LINUX_VERSION_IS_LESS(5, 15, 0)
diff --git a/compat-include/linux/prandom.h b/compat-include/linux/prandom.h
index dc227e61..ec2f5244 100644
--- a/compat-include/linux/prandom.h
+++ b/compat-include/linux/prandom.h
@@ -12,7 +12,6 @@
#include <linux/version.h>
#if LINUX_VERSION_IS_GEQ(5, 8, 1) || \
- (LINUX_VERSION_IS_GEQ(4, 9, 233) && LINUX_VERSION_IS_LESS(4, 10, 0)) || \
(LINUX_VERSION_IS_GEQ(4, 14, 193) && LINUX_VERSION_IS_LESS(4, 15, 0)) || \
(LINUX_VERSION_IS_GEQ(4, 19, 138) && LINUX_VERSION_IS_LESS(4, 20, 0)) || \
(LINUX_VERSION_IS_GEQ(5, 4, 57) && LINUX_VERSION_IS_LESS(5, 5, 0)) || \
diff --git a/compat-include/linux/skbuff.h b/compat-include/linux/skbuff.h
index 77c4e99f..eda2d181 100644
--- a/compat-include/linux/skbuff.h
+++ b/compat-include/linux/skbuff.h
@@ -13,35 +13,6 @@
#include <linux/version.h>
#include_next <linux/skbuff.h>
-#if LINUX_VERSION_IS_LESS(4, 13, 0)
-
-static inline void *batadv_skb_put(struct sk_buff *skb, unsigned int len)
-{
- return (void *)skb_put(skb, len);
-}
-#define skb_put batadv_skb_put
-
-static inline void *skb_put_zero(struct sk_buff *skb, unsigned int len)
-{
- void *tmp = skb_put(skb, len);
-
- memset(tmp, 0, len);
-
- return tmp;
-}
-
-static inline void *skb_put_data(struct sk_buff *skb, const void *data,
- unsigned int len)
-{
- void *tmp = skb_put(skb, len);
-
- memcpy(tmp, data, len);
-
- return tmp;
-}
-
-#endif /* LINUX_VERSION_IS_LESS(4, 13, 0) */
-
#if LINUX_VERSION_IS_LESS(5, 4, 0)
#define nf_reset_ct nf_reset
diff --git a/compat-include/linux/timer.h b/compat-include/linux/timer.h
deleted file mode 100644
index 36da61f7..00000000
--- a/compat-include/linux/timer.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/* Copyright (C) B.A.T.M.A.N. contributors:
- *
- * Marek Lindner, Simon Wunderlich
- *
- * This file contains macros for maintaining compatibility with older versions
- * of the Linux kernel.
- */
-
-#ifndef _NET_BATMAN_ADV_COMPAT_LINUX_TIMER_H
-#define _NET_BATMAN_ADV_COMPAT_LINUX_TIMER_H
-
-#include <linux/version.h>
-#include_next <linux/timer.h>
-
-#if LINUX_VERSION_IS_LESS(4, 14, 0)
-
-#define TIMER_DATA_TYPE unsigned long
-#define TIMER_FUNC_TYPE void (*)(TIMER_DATA_TYPE)
-
-static inline void timer_setup(struct timer_list *timer,
- void (*callback)(struct timer_list *),
- unsigned int flags)
-{
- __setup_timer(timer, (TIMER_FUNC_TYPE)callback,
- (TIMER_DATA_TYPE)timer, flags);
-}
-
-#define from_timer(var, callback_timer, timer_fieldname) \
- container_of(callback_timer, typeof(*var), timer_fieldname)
-
-#endif /* LINUX_VERSION_IS_LESS(4, 14, 0) */
-
-#endif /* _NET_BATMAN_ADV_COMPAT_LINUX_TIMER_H */
diff --git a/compat-include/uapi/linux/if_ether.h b/compat-include/uapi/linux/if_ether.h
deleted file mode 100644
index a23fa4d8..00000000
--- a/compat-include/uapi/linux/if_ether.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/* Copyright (C) B.A.T.M.A.N. contributors:
- *
- * Marek Lindner, Simon Wunderlich
- *
- * This file contains macros for maintaining compatibility with older versions
- * of the Linux kernel.
- */
-
-#ifndef _NET_BATMAN_ADV_COMPAT_UAPI_LINUX_IF_ETHER_H_
-#define _NET_BATMAN_ADV_COMPAT_UAPI_LINUX_IF_ETHER_H_
-
-#include <linux/version.h>
-#include_next <uapi/linux/if_ether.h>
-
-
-#if LINUX_VERSION_IS_LESS(4, 10, 0)
-
-#ifndef ETH_MIN_MTU
-#define ETH_MIN_MTU 68
-#endif
-
-#endif /* LINUX_VERSION_IS_LESS(4, 10, 0) */
-
-#endif /* _NET_BATMAN_ADV_COMPAT_UAPI_LINUX_IF_ETHER_H_ */
diff --git a/compat.h b/compat.h
index 86e68d83..8e19f9bb 100644
--- a/compat.h
+++ b/compat.h
@@ -15,16 +15,6 @@
#include "compat-autoconf.h"
-#if LINUX_VERSION_IS_LESS(4, 13, 0)
-
-#define batadv_softif_validate(__tb, __data, __extack) \
- batadv_softif_validate(__tb, __data)
-
-#define batadv_softif_newlink(__src_net, __dev, __tb, __data, __extack) \
- batadv_softif_newlink(__src_net, __dev, __tb, __data)
-
-#endif /* LINUX_VERSION_IS_LESS(4, 13, 0) */
-
#if LINUX_VERSION_IS_LESS(4, 15, 0)
--
2.35.1
1 month, 2 weeks