pull request for net-next: batman-adv 2017-12-15
Subsystems (4)
cover pull request for net-next: batman-adv 2017-12-15
Hi David,
here is a feature/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 4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323:
Linux 4.15-rc1 (2017-11-26 16:01:47 -0800)
are available in the git repository at:
git://git.open-mesh.org/linux-merge.git tags/batadv-next-for-davem-20171215
for you to fetch changes up to 74027aab7f808eca71521b61d55fc06e040ec89e:
batman-adv: Add kernel-doc to externally visible functions (2017-12-04 13:22:25 +0100)
----------------------------------------------------------------
This feature/cleanup patchset includes the following patches:
- bump version strings, by Simon Wunderlich
- de-inline hash functions to save memory footprint, by Denys Vlasenko
- Add License information to various files, by Sven Eckelmann (4 patches)
- Change batman_adv.h from ISC to MIT, by Sven Eckelmann
- Improve various includes, by Sven Eckelmann (5 patches)
- Lots of kernel-doc work by Sven Eckelmann (8 patches)
----------------------------------------------------------------
Denys Vlasenko (1):
batman-adv: Deinline batadv_orig_hash_find, save 7339 bytes
Simon Wunderlich (1):
batman-adv: Start new development cycle
Sven Eckelmann (18):
batman-adv: Add License-Filename to GPL-2.0 files
batman-adv: Add SPDX license identifier above copyright header
batman-adv: Add SPDX license identifier to batman-adv.rst
batman-adv: Add license header to Kconfig
batman-adv: Change batman_adv.h license to MIT
batman-adv: include gfp.h for GFP_* defines
batman-adv: include build_bug.h for BUILD_BUG_ON define
batman-adv: Include net.h for net_ratelimited_function
batman-adv: include kobject.h for kobject_* functions
batman-adv: Remove unused sched.h include
batman-adv: Add missing kernel-doc to packet.h
batman-adv: Use parentheses in function kernel-doc
batman-adv: Use inline kernel-doc for enum/struct
batman-adv: Fix kernel-doc references to struct members
batman-adv: Add kernel-doc to structs in headers
batman-adv: Add kernel-doc to enums in headers
batman-adv: Add kernel-doc to functions in headers
batman-adv: Add kernel-doc to externally visible functions
Documentation/networking/batman-adv.rst | 2 + compat-include/linux/build_bug.h | 34 + include/uapi/linux/batman_adv.h | 27 +- net/batman-adv/Kconfig | 19 + net/batman-adv/Makefile | 3 +- net/batman-adv/bat_algo.c | 37 +- net/batman-adv/bat_algo.h | 3 + net/batman-adv/bat_iv_ogm.c | 107 +- net/batman-adv/bat_iv_ogm.h | 3 + net/batman-adv/bat_v.c | 51 +- net/batman-adv/bat_v.h | 3 + net/batman-adv/bat_v_elp.c | 29 +- net/batman-adv/bat_v_elp.h | 3 + net/batman-adv/bat_v_ogm.c | 39 +- net/batman-adv/bat_v_ogm.h | 3 + net/batman-adv/bitarray.c | 5 +- net/batman-adv/bitarray.h | 12 +- net/batman-adv/bridge_loop_avoidance.c | 114 +- net/batman-adv/bridge_loop_avoidance.h | 7 +- net/batman-adv/debugfs.c | 32 +- net/batman-adv/debugfs.h | 3 + net/batman-adv/distributed-arp-table.c | 82 +- net/batman-adv/distributed-arp-table.h | 9 +- net/batman-adv/fragmentation.c | 25 +- net/batman-adv/fragmentation.h | 5 +- net/batman-adv/gateway_client.c | 67 +- net/batman-adv/gateway_client.h | 3 + net/batman-adv/gateway_common.c | 30 +- net/batman-adv/gateway_common.h | 8 +- net/batman-adv/hard-interface.c | 67 +- net/batman-adv/hard-interface.h | 61 +- net/batman-adv/hash.c | 22 +- net/batman-adv/hash.h | 30 +- net/batman-adv/icmp_socket.c | 17 +- net/batman-adv/icmp_socket.h | 3 + net/batman-adv/log.c | 21 + net/batman-adv/log.h | 64 +- net/batman-adv/main.c | 54 +- net/batman-adv/main.h | 125 +- net/batman-adv/multicast.c | 83 +- net/batman-adv/multicast.h | 19 +- net/batman-adv/netlink.c | 27 +- net/batman-adv/netlink.h | 3 + net/batman-adv/network-coding.c | 126 +- net/batman-adv/network-coding.h | 3 + net/batman-adv/originator.c | 156 ++- net/batman-adv/originator.h | 49 +- net/batman-adv/packet.h | 28 +- net/batman-adv/routing.c | 56 +- net/batman-adv/routing.h | 3 + net/batman-adv/send.c | 68 +- net/batman-adv/send.h | 7 +- net/batman-adv/soft-interface.c | 66 +- net/batman-adv/soft-interface.h | 3 + net/batman-adv/sysfs.c | 58 +- net/batman-adv/sysfs.h | 16 + net/batman-adv/tp_meter.c | 77 +- net/batman-adv/tp_meter.h | 3 + net/batman-adv/translation-table.c | 234 ++-- net/batman-adv/translation-table.h | 3 + net/batman-adv/tvlv.c | 43 +- net/batman-adv/tvlv.h | 3 + net/batman-adv/types.h | 1995 +++++++++++++++++++++---------- 63 files changed, 3005 insertions(+), 1353 deletions(-) create mode 100644 compat-include/linux/build_bug.h
Simon Wunderlich
maintainerPATCH 1/20 batman-adv: Start new development cycle
--- net/batman-adv/main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/batman-adv/main.h +1 -1
@@ -24,7 +24,7 @@#define BATADV_DRIVER_DEVICE "batman-adv"#ifndef BATADV_SOURCE_VERSION -#define BATADV_SOURCE_VERSION "2017.4" +#define BATADV_SOURCE_VERSION "2018.0"#endif /* B.A.T.M.A.N. parameters */
Signature · 1 line
2.11.0
Simon Wunderlich
maintainerPATCH 2/20 batman-adv: Deinline batadv_orig_hash_find, save 7339 bytes
In reply to Simon WunderlichFrom: Denys Vlasenko <[email protected]>
This function compiles to 288 bytes of machine code for Linux 4.14 on Debian Stretch amd64 and (6.3.0-18) with the default configuration. 27 callsites (25 used in default config).
text data bss dec hex filename
179291 10317 4416 194024 2f5e8 batman-adv.ko.pre 171952 10317 4416 186685 2d93d batman-adv.ko.post
--- net/batman-adv/originator.c | 32 ++++++++++++++++++++++++++++++++ net/batman-adv/originator.h | 37 ++----------------------------------- 2 files changed, 34 insertions(+), 35 deletions(-)
net/batman-adv/originator.c +32 -0
@@ -30,10 +30,12 @@#include <linux/netdevice.h> #include <linux/netlink.h> #include <linux/rculist.h> +#include <linux/rcupdate.h> #include <linux/seq_file.h> #include <linux/skbuff.h> #include <linux/slab.h> #include <linux/spinlock.h> +#include <linux/stddef.h> #include <linux/workqueue.h> #include <net/sock.h> #include <uapi/linux/batman_adv.h>
@@ -55,6 +57,36 @@/* hash class keys */ static struct lock_class_key batadv_orig_hash_lock_class_key; +struct batadv_orig_node * +batadv_orig_hash_find (struct batadv_priv *bat_priv,const void *data) +{ +struct batadv_hashtable *hash = bat_priv->orig_hash; +struct hlist_head *head; +struct batadv_orig_node *orig_node, *orig_node_tmp =NULL ; +int index; + +if (!hash) +return NULL ; + + index =batadv_choose_orig (data, hash->size); + head = &hash->table[index]; + +rcu_read_lock (); +hlist_for_each_entry_rcu (orig_node, head, hash_entry) { +if (!batadv_compare_eth (orig_node, data)) +continue ; + +if (!kref_get_unless_zero (&orig_node->refcount)) +continue ; + + orig_node_tmp = orig_node; +break ; + } +rcu_read_unlock (); + +return orig_node_tmp; +} +static void batadv_purge_orig (struct work_struct *work);/**
net/batman-adv/originator.h +2 -35
@@ -23,14 +23,8 @@#include <linux/compiler.h> #include <linux/if_ether.h> #include <linux/jhash.h> -#include <linux/kref.h> -#include <linux/rculist.h> -#include <linux/rcupdate.h> -#include <linux/stddef.h> #include <linux/types.h> -#include "hash.h" -struct netlink_callback ;struct seq_file ;struct sk_buff ;
@@ -100,34 +94,7 @@ static inline u32 batadv_choose_orig(const void *data, u32 size) return hash % size; } -static inline struct batadv_orig_node * -batadv_orig_hash_find (struct batadv_priv *bat_priv,const void *data) -{ -struct batadv_hashtable *hash = bat_priv->orig_hash; -struct hlist_head *head; -struct batadv_orig_node *orig_node, *orig_node_tmp =NULL ; -int index; - -if (!hash) -return NULL ; - - index =batadv_choose_orig (data, hash->size); - head = &hash->table[index]; - -rcu_read_lock (); -hlist_for_each_entry_rcu (orig_node, head, hash_entry) { -if (!batadv_compare_eth (orig_node, data)) -continue ; - -if (!kref_get_unless_zero (&orig_node->refcount)) -continue ; - - orig_node_tmp = orig_node; -break ; - } -rcu_read_unlock (); - -return orig_node_tmp; -} +struct batadv_orig_node * +batadv_orig_hash_find (struct batadv_priv *bat_priv,const void *data);#endif /* _NET_BATMAN_ADV_ORIGINATOR_H_ */
Signature · 1 line
2.11.0
Simon Wunderlich
maintainerPATCH 3/20 batman-adv: Add License-Filename to GPL-2.0 files
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
The FSFE REUSE practices [1] recommend to add a "License-Filename" tag to files which don't contain the complete license text. The GPL-2.0 files usually only have a small notice at the beginning of the file. The longer license is usually stored in a separate file and therefore should be referenced accordingly.
--- net/batman-adv/Makefile | 1 + net/batman-adv/bat_algo.c | 2 ++ net/batman-adv/bat_algo.h | 2 ++ net/batman-adv/bat_iv_ogm.c | 2 ++ net/batman-adv/bat_iv_ogm.h | 2 ++ net/batman-adv/bat_v.c | 2 ++ net/batman-adv/bat_v.h | 2 ++ net/batman-adv/bat_v_elp.c | 2 ++ net/batman-adv/bat_v_elp.h | 2 ++ net/batman-adv/bat_v_ogm.c | 2 ++ net/batman-adv/bat_v_ogm.h | 2 ++ net/batman-adv/bitarray.c | 2 ++ net/batman-adv/bitarray.h | 2 ++ net/batman-adv/bridge_loop_avoidance.c | 2 ++ net/batman-adv/bridge_loop_avoidance.h | 2 ++ net/batman-adv/debugfs.c | 2 ++ net/batman-adv/debugfs.h | 2 ++ net/batman-adv/distributed-arp-table.c | 2 ++ net/batman-adv/distributed-arp-table.h | 2 ++ net/batman-adv/fragmentation.c | 2 ++ net/batman-adv/fragmentation.h | 2 ++ net/batman-adv/gateway_client.c | 2 ++ net/batman-adv/gateway_client.h | 2 ++ net/batman-adv/gateway_common.c | 2 ++ net/batman-adv/gateway_common.h | 2 ++ net/batman-adv/hard-interface.c | 2 ++ net/batman-adv/hard-interface.h | 2 ++ net/batman-adv/hash.c | 2 ++ net/batman-adv/hash.h | 2 ++ net/batman-adv/icmp_socket.c | 2 ++ net/batman-adv/icmp_socket.h | 2 ++ net/batman-adv/log.c | 2 ++ net/batman-adv/log.h | 2 ++ net/batman-adv/main.c | 2 ++ net/batman-adv/main.h | 2 ++ net/batman-adv/multicast.c | 2 ++ net/batman-adv/multicast.h | 2 ++ net/batman-adv/netlink.c | 2 ++ net/batman-adv/netlink.h | 2 ++ net/batman-adv/network-coding.c | 2 ++ net/batman-adv/network-coding.h | 2 ++ net/batman-adv/originator.c | 2 ++ net/batman-adv/originator.h | 2 ++ net/batman-adv/packet.h | 2 ++ net/batman-adv/routing.c | 2 ++ net/batman-adv/routing.h | 2 ++ net/batman-adv/send.c | 2 ++ net/batman-adv/send.h | 2 ++ net/batman-adv/soft-interface.c | 2 ++ net/batman-adv/soft-interface.h | 2 ++ net/batman-adv/sysfs.c | 2 ++ net/batman-adv/sysfs.h | 2 ++ net/batman-adv/tp_meter.c | 2 ++ net/batman-adv/tp_meter.h | 2 ++ net/batman-adv/translation-table.c | 2 ++ net/batman-adv/translation-table.h | 2 ++ net/batman-adv/tvlv.c | 2 ++ net/batman-adv/tvlv.h | 2 ++ net/batman-adv/types.h | 2 ++ 59 files changed, 117 insertions(+)
net/batman-adv/Makefile +1 -0
@@ -15,6 +15,7 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, see <http://www.gnu.org/licenses/>. # +# License-Filename: LICENSES/preferred/GPL-2.0 obj-$(CONFIG_BATMAN_ADV) += batman-adv.o batman-adv-y += bat_algo.o
net/batman-adv/bat_algo.c +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #include "main.h"
net/batman-adv/bat_algo.h +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #ifndef _NET_BATMAN_ADV_BAT_ALGO_H_
net/batman-adv/bat_iv_ogm.c +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #include "bat_iv_ogm.h"
net/batman-adv/bat_iv_ogm.h +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #ifndef _BATMAN_ADV_BATADV_IV_OGM_H_
net/batman-adv/bat_v.c +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #include "bat_v.h"
net/batman-adv/bat_v.h +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #ifndef _NET_BATMAN_ADV_BAT_V_H_
net/batman-adv/bat_v_elp.c +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #include "bat_v_elp.h"
net/batman-adv/bat_v_elp.h +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #ifndef _NET_BATMAN_ADV_BAT_V_ELP_H_
net/batman-adv/bat_v_ogm.c +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #include "bat_v_ogm.h"
net/batman-adv/bat_v_ogm.h +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #ifndef _BATMAN_ADV_BATADV_V_OGM_H_
net/batman-adv/bitarray.c +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #include "bitarray.h"
net/batman-adv/bitarray.h +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #ifndef _NET_BATMAN_ADV_BITARRAY_H_
net/batman-adv/bridge_loop_avoidance.c +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #include "bridge_loop_avoidance.h"
net/batman-adv/bridge_loop_avoidance.h +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #ifndef _NET_BATMAN_ADV_BLA_H_
net/batman-adv/debugfs.c +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #include "debugfs.h"
net/batman-adv/debugfs.h +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #ifndef _NET_BATMAN_ADV_DEBUGFS_H_
net/batman-adv/distributed-arp-table.c +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #include "distributed-arp-table.h"
net/batman-adv/distributed-arp-table.h +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #ifndef _NET_BATMAN_ADV_DISTRIBUTED_ARP_TABLE_H_
net/batman-adv/fragmentation.c +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #include "fragmentation.h"
net/batman-adv/fragmentation.h +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #ifndef _NET_BATMAN_ADV_FRAGMENTATION_H_
net/batman-adv/gateway_client.c +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #include "gateway_client.h"
net/batman-adv/gateway_client.h +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #ifndef _NET_BATMAN_ADV_GATEWAY_CLIENT_H_
net/batman-adv/gateway_common.c +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #include "gateway_common.h"
net/batman-adv/gateway_common.h +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #ifndef _NET_BATMAN_ADV_GATEWAY_COMMON_H_
net/batman-adv/hard-interface.c +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #include "hard-interface.h"
net/batman-adv/hard-interface.h +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #ifndef _NET_BATMAN_ADV_HARD_INTERFACE_H_
net/batman-adv/hash.c +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #include "hash.h"
net/batman-adv/hash.h +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #ifndef _NET_BATMAN_ADV_HASH_H_
net/batman-adv/icmp_socket.c +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #include "icmp_socket.h"
net/batman-adv/icmp_socket.h +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #ifndef _NET_BATMAN_ADV_ICMP_SOCKET_H_
net/batman-adv/log.c +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #include "log.h"
net/batman-adv/log.h +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #ifndef _NET_BATMAN_ADV_LOG_H_
net/batman-adv/main.c +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #include "main.h"
net/batman-adv/main.h +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #ifndef _NET_BATMAN_ADV_MAIN_H_
net/batman-adv/multicast.c +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #include "multicast.h"
net/batman-adv/multicast.h +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #ifndef _NET_BATMAN_ADV_MULTICAST_H_
net/batman-adv/netlink.c +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #include "netlink.h"
net/batman-adv/netlink.h +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #ifndef _NET_BATMAN_ADV_NETLINK_H_
net/batman-adv/network-coding.c +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #include "network-coding.h"
net/batman-adv/network-coding.h +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #ifndef _NET_BATMAN_ADV_NETWORK_CODING_H_
net/batman-adv/originator.c +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #include "originator.h"
net/batman-adv/originator.h +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #ifndef _NET_BATMAN_ADV_ORIGINATOR_H_
net/batman-adv/packet.h +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #ifndef _NET_BATMAN_ADV_PACKET_H_
net/batman-adv/routing.c +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #include "routing.h"
net/batman-adv/routing.h +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #ifndef _NET_BATMAN_ADV_ROUTING_H_
net/batman-adv/send.c +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #include "send.h"
net/batman-adv/send.h +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #ifndef _NET_BATMAN_ADV_SEND_H_
net/batman-adv/soft-interface.c +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #include "soft-interface.h"
net/batman-adv/soft-interface.h +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #ifndef _NET_BATMAN_ADV_SOFT_INTERFACE_H_
net/batman-adv/sysfs.c +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #include "sysfs.h"
net/batman-adv/sysfs.h +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #ifndef _NET_BATMAN_ADV_SYSFS_H_
net/batman-adv/tp_meter.c +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #include "tp_meter.h"
net/batman-adv/tp_meter.h +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #ifndef _NET_BATMAN_ADV_TP_METER_H_
net/batman-adv/translation-table.c +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #include "translation-table.h"
net/batman-adv/translation-table.h +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #ifndef _NET_BATMAN_ADV_TRANSLATION_TABLE_H_
net/batman-adv/tvlv.c +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #include "main.h"
net/batman-adv/tvlv.h +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #ifndef _NET_BATMAN_ADV_TVLV_H_
net/batman-adv/types.h +2 -0
@@ -13,6 +13,8 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 */ #ifndef _NET_BATMAN_ADV_TYPES_H_
Signature · 1 line
2.11.0
David Miller
maintainerRe: [PATCH 03/20] batman-adv: Add License-Filename to GPL-2.0 files
From: Simon Wunderlich <[email protected]>
Date: Fri, 15 Dec 2017 12:43:03 +0100
Quoted 5 lines
The FSFE REUSE practices [1] recommend to add a "License-Filename" tag to files which don't contain the complete license text. The GPL-2.0 files usually only have a small notice at the beginning of the file. The longer license is usually stored in a separate file and therefore should be referenced accordingly.
Nothing else in entire kernel tree uses this.
I strongly discourage you from doing something at this level that is not in accordance with some kind of precendence or official recommendation for the rest of the kernel project.
If you want this to start happening, discuss it on a global scale on lkml.
I'm definitely not pulling this tree with these changes in it.
Sorrry.
A message that is not in the archive (sent off-list or not yet received): 20171215114320.13645-1-sw-2YrNx6rUIHYiY0qSoAWiAoQuADTiUCJX@public.gmane.org
PATCH 4/20 batman-adv: Add SPDX license identifier above copyright header
From: Sven Eckelmann <[email protected]>
The "Linux kernel licensing rules" require that each file has a SPDX license identifier as first line (and sometimes as second line).
The FSFE REUSE practices [1] would also require the same tags but have no restrictions on the placement in the source file. Using the "Linux kernel licensing rules" is therefore also fulfilling the FSFE REUSE practices requirements at the same time.
[1] https://reuse.software/practices/
--- include/uapi/linux/batman_adv.h | 1 + net/batman-adv/Makefile | 2 +- net/batman-adv/bat_algo.c | 1 + net/batman-adv/bat_algo.h | 1 + net/batman-adv/bat_iv_ogm.c | 1 + net/batman-adv/bat_iv_ogm.h | 1 + net/batman-adv/bat_v.c | 1 + net/batman-adv/bat_v.h | 1 + net/batman-adv/bat_v_elp.c | 1 + net/batman-adv/bat_v_elp.h | 1 + net/batman-adv/bat_v_ogm.c | 1 + net/batman-adv/bat_v_ogm.h | 1 + net/batman-adv/bitarray.c | 1 + net/batman-adv/bitarray.h | 1 + net/batman-adv/bridge_loop_avoidance.c | 1 + net/batman-adv/bridge_loop_avoidance.h | 1 + net/batman-adv/debugfs.c | 1 + net/batman-adv/debugfs.h | 1 + net/batman-adv/distributed-arp-table.c | 1 + net/batman-adv/distributed-arp-table.h | 1 + net/batman-adv/fragmentation.c | 1 + net/batman-adv/fragmentation.h | 1 + net/batman-adv/gateway_client.c | 1 + net/batman-adv/gateway_client.h | 1 + net/batman-adv/gateway_common.c | 1 + net/batman-adv/gateway_common.h | 1 + net/batman-adv/hard-interface.c | 1 + net/batman-adv/hard-interface.h | 1 + net/batman-adv/hash.c | 1 + net/batman-adv/hash.h | 1 + net/batman-adv/icmp_socket.c | 1 + net/batman-adv/icmp_socket.h | 1 + net/batman-adv/log.c | 1 + net/batman-adv/log.h | 1 + net/batman-adv/main.c | 1 + net/batman-adv/main.h | 1 + net/batman-adv/multicast.c | 1 + net/batman-adv/multicast.h | 1 + net/batman-adv/netlink.c | 1 + net/batman-adv/netlink.h | 1 + net/batman-adv/network-coding.c | 1 + net/batman-adv/network-coding.h | 1 + net/batman-adv/originator.c | 1 + net/batman-adv/originator.h | 1 + net/batman-adv/packet.h | 1 + net/batman-adv/routing.c | 1 + net/batman-adv/routing.h | 1 + net/batman-adv/send.c | 1 + net/batman-adv/send.h | 1 + net/batman-adv/soft-interface.c | 1 + net/batman-adv/soft-interface.h | 1 + net/batman-adv/sysfs.c | 1 + net/batman-adv/sysfs.h | 1 + net/batman-adv/tp_meter.c | 1 + net/batman-adv/tp_meter.h | 1 + net/batman-adv/translation-table.c | 1 + net/batman-adv/translation-table.h | 1 + net/batman-adv/tvlv.c | 1 + net/batman-adv/tvlv.h | 1 + net/batman-adv/types.h | 1 + 60 files changed, 60 insertions(+), 1 deletion(-)
include/uapi/linux/batman_adv.h +1 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: ISC */ /* Copyright (C) 2016-2017 B.A.T.M.A.N. contributors: * * Matthias Schiffer
net/batman-adv/Makefile +1 -1
@@ -1,4 +1,4 @@ -# +# SPDX-License-Identifier: GPL-2.0 # Copyright (C) 2007-2017 B.A.T.M.A.N. contributors: # # Marek Lindner, Simon Wunderlich
net/batman-adv/bat_algo.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2007-2017 B.A.T.M.A.N. contributors: * * Marek Lindner, Simon Wunderlich
net/batman-adv/bat_algo.h +1 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2011-2017 B.A.T.M.A.N. contributors: * * Marek Lindner, Linus Lüssing
net/batman-adv/bat_iv_ogm.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2007-2017 B.A.T.M.A.N. contributors: * * Marek Lindner, Simon Wunderlich
net/batman-adv/bat_iv_ogm.h +1 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2007-2017 B.A.T.M.A.N. contributors: * * Marek Lindner, Simon Wunderlich
net/batman-adv/bat_v.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2013-2017 B.A.T.M.A.N. contributors: * * Linus Lüssing, Marek Lindner
net/batman-adv/bat_v.h +1 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2011-2017 B.A.T.M.A.N. contributors: * * Marek Lindner, Linus Lüssing
net/batman-adv/bat_v_elp.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2011-2017 B.A.T.M.A.N. contributors: * * Linus Lüssing, Marek Lindner
net/batman-adv/bat_v_elp.h +1 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2013-2017 B.A.T.M.A.N. contributors: * * Linus Lüssing, Marek Lindner
net/batman-adv/bat_v_ogm.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2013-2017 B.A.T.M.A.N. contributors: * * Antonio Quartulli
net/batman-adv/bat_v_ogm.h +1 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2013-2017 B.A.T.M.A.N. contributors: * * Antonio Quartulli
net/batman-adv/bitarray.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2006-2017 B.A.T.M.A.N. contributors: * * Simon Wunderlich, Marek Lindner
net/batman-adv/bitarray.h +1 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2006-2017 B.A.T.M.A.N. contributors: * * Simon Wunderlich, Marek Lindner
net/batman-adv/bridge_loop_avoidance.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2011-2017 B.A.T.M.A.N. contributors: * * Simon Wunderlich
net/batman-adv/bridge_loop_avoidance.h +1 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2011-2017 B.A.T.M.A.N. contributors: * * Simon Wunderlich
net/batman-adv/debugfs.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2010-2017 B.A.T.M.A.N. contributors: * * Marek Lindner
net/batman-adv/debugfs.h +1 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2010-2017 B.A.T.M.A.N. contributors: * * Marek Lindner
net/batman-adv/distributed-arp-table.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2011-2017 B.A.T.M.A.N. contributors: * * Antonio Quartulli
net/batman-adv/distributed-arp-table.h +1 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2011-2017 B.A.T.M.A.N. contributors: * * Antonio Quartulli
net/batman-adv/fragmentation.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2013-2017 B.A.T.M.A.N. contributors: * * Martin Hundebøll <[email protected]>
net/batman-adv/fragmentation.h +1 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2013-2017 B.A.T.M.A.N. contributors: * * Martin Hundebøll <[email protected]>
net/batman-adv/gateway_client.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2009-2017 B.A.T.M.A.N. contributors: * * Marek Lindner
net/batman-adv/gateway_client.h +1 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2009-2017 B.A.T.M.A.N. contributors: * * Marek Lindner
net/batman-adv/gateway_common.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2009-2017 B.A.T.M.A.N. contributors: * * Marek Lindner
net/batman-adv/gateway_common.h +1 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2009-2017 B.A.T.M.A.N. contributors: * * Marek Lindner
net/batman-adv/hard-interface.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2007-2017 B.A.T.M.A.N. contributors: * * Marek Lindner, Simon Wunderlich
net/batman-adv/hard-interface.h +1 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2007-2017 B.A.T.M.A.N. contributors: * * Marek Lindner, Simon Wunderlich
net/batman-adv/hash.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2006-2017 B.A.T.M.A.N. contributors: * * Simon Wunderlich, Marek Lindner
net/batman-adv/hash.h +1 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2006-2017 B.A.T.M.A.N. contributors: * * Simon Wunderlich, Marek Lindner
net/batman-adv/icmp_socket.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2007-2017 B.A.T.M.A.N. contributors: * * Marek Lindner
net/batman-adv/icmp_socket.h +1 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2007-2017 B.A.T.M.A.N. contributors: * * Marek Lindner
net/batman-adv/log.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2010-2017 B.A.T.M.A.N. contributors: * * Marek Lindner
net/batman-adv/log.h +1 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2007-2017 B.A.T.M.A.N. contributors: * * Marek Lindner, Simon Wunderlich
net/batman-adv/main.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2007-2017 B.A.T.M.A.N. contributors: * * Marek Lindner, Simon Wunderlich
net/batman-adv/main.h +1 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2007-2017 B.A.T.M.A.N. contributors: * * Marek Lindner, Simon Wunderlich
net/batman-adv/multicast.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2014-2017 B.A.T.M.A.N. contributors: * * Linus Lüssing
net/batman-adv/multicast.h +1 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2014-2017 B.A.T.M.A.N. contributors: * * Linus Lüssing
net/batman-adv/netlink.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2016-2017 B.A.T.M.A.N. contributors: * * Matthias Schiffer
net/batman-adv/netlink.h +1 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2016-2017 B.A.T.M.A.N. contributors: * * Matthias Schiffer
net/batman-adv/network-coding.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2012-2017 B.A.T.M.A.N. contributors: * * Martin Hundebøll, Jeppe Ledet-Pedersen
net/batman-adv/network-coding.h +1 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2012-2017 B.A.T.M.A.N. contributors: * * Martin Hundebøll, Jeppe Ledet-Pedersen
net/batman-adv/originator.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2009-2017 B.A.T.M.A.N. contributors: * * Marek Lindner, Simon Wunderlich
net/batman-adv/originator.h +1 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2007-2017 B.A.T.M.A.N. contributors: * * Marek Lindner, Simon Wunderlich
net/batman-adv/packet.h +1 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2007-2017 B.A.T.M.A.N. contributors: * * Marek Lindner, Simon Wunderlich
net/batman-adv/routing.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2007-2017 B.A.T.M.A.N. contributors: * * Marek Lindner, Simon Wunderlich
net/batman-adv/routing.h +1 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2007-2017 B.A.T.M.A.N. contributors: * * Marek Lindner, Simon Wunderlich
net/batman-adv/send.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2007-2017 B.A.T.M.A.N. contributors: * * Marek Lindner, Simon Wunderlich
net/batman-adv/send.h +1 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2007-2017 B.A.T.M.A.N. contributors: * * Marek Lindner, Simon Wunderlich
net/batman-adv/soft-interface.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2007-2017 B.A.T.M.A.N. contributors: * * Marek Lindner, Simon Wunderlich
net/batman-adv/soft-interface.h +1 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2007-2017 B.A.T.M.A.N. contributors: * * Marek Lindner
net/batman-adv/sysfs.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2010-2017 B.A.T.M.A.N. contributors: * * Marek Lindner
net/batman-adv/sysfs.h +1 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2010-2017 B.A.T.M.A.N. contributors: * * Marek Lindner
net/batman-adv/tp_meter.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2012-2017 B.A.T.M.A.N. contributors: * * Edo Monticelli, Antonio Quartulli
net/batman-adv/tp_meter.h +1 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2012-2017 B.A.T.M.A.N. contributors: * * Edo Monticelli, Antonio Quartulli
net/batman-adv/translation-table.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2007-2017 B.A.T.M.A.N. contributors: * * Marek Lindner, Simon Wunderlich, Antonio Quartulli
net/batman-adv/translation-table.h +1 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2007-2017 B.A.T.M.A.N. contributors: * * Marek Lindner, Simon Wunderlich, Antonio Quartulli
net/batman-adv/tvlv.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2007-2017 B.A.T.M.A.N. contributors: * * Marek Lindner, Simon Wunderlich
net/batman-adv/tvlv.h +1 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2007-2017 B.A.T.M.A.N. contributors: * * Marek Lindner, Simon Wunderlich
net/batman-adv/types.h +1 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2007-2017 B.A.T.M.A.N. contributors: * * Marek Lindner, Simon Wunderlich
Signature · 1 line
2.11.0
PATCH 5/20 batman-adv: Add SPDX license identifier to batman-adv.rst
In reply to a message not in the archiveFrom: Sven Eckelmann <[email protected]>
The "Linux licensing rules" require that also the restructuredText files are marked with the appropriate SPDX license identifier.
--- Documentation/networking/batman-adv.rst | 2 ++ 1 file changed, 2 insertions(+)
Documentation/networking/batman-adv.rst +2 -0
@@ -1,3 +1,5 @@ +.. SPDX-License-Identifier: GPL-2.0 + ========== batman-adv ==========
Signature · 1 line
2.11.0
Simon Wunderlich
maintainerPATCH 6/20 batman-adv: Add license header to Kconfig
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
The last remaining file without license notice and/or SPDX license identifier under net/batman-adv/ is the Kconfig. It should have been licensed under the same conditions as the rest of batman-adv and the Makefile which uses the CONFIG_* variables from Kconfig.
--- net/batman-adv/Kconfig | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
net/batman-adv/Kconfig +19 -0
@@ -1,3 +1,22 @@ +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2007-2017 B.A.T.M.A.N. contributors: +# +# Marek Lindner, Simon Wunderlich +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of version 2 of the GNU General Public +# License as published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see <http://www.gnu.org/licenses/>. +# +# License-Filename: LICENSES/preferred/GPL-2.0 + # # B.A.T.M.A.N meshing protocol #
Signature · 1 line
2.11.0
Simon Wunderlich
maintainerPATCH 7/20 batman-adv: Change batman_adv.h license to MIT
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
The ISC license is considered as not recommended in "Linux kernel licensing rules". It should only be used for existing code or for importing code from a different project with that license.
But the kernel still has the similar sounding MIT/Expat license under the preferred licenses. Switching to this license for this relatively new file should therefore allow batman-adv to better follow the new licensing rules.
--- include/uapi/linux/batman_adv.h | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-)
include/uapi/linux/batman_adv.h +17 -11
@@ -1,19 +1,25 @@ -/* SPDX-License-Identifier: ISC */ +/* SPDX-License-Identifier: MIT */ /* Copyright (C) 2016-2017 B.A.T.M.A.N. contributors: * * Matthias Schiffer * -* Permission to use, copy, modify, and/or distribute this software for any -* purpose with or without fee is hereby granted, provided that the above -* copyright notice and this permission notice appear in all copies. +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: * -* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +* DEALINGS IN THE SOFTWARE. */ #ifndef _UAPI_LINUX_BATMAN_ADV_H_
Signature · 1 line
2.11.0
Simon Wunderlich
maintainerPATCH 8/20 batman-adv: include gfp.h for GFP_* defines
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
The linux/gfp.h provides the GFP_ATOMIC and GFP_KERNEL define. It should therefore be included instead of linux/fs.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 | 2 +- net/batman-adv/distributed-arp-table.c | 2 +- net/batman-adv/fragmentation.c | 2 +- net/batman-adv/gateway_client.c | 2 +- net/batman-adv/hard-interface.c | 2 +- net/batman-adv/hash.c | 2 +- net/batman-adv/icmp_socket.c | 1 + net/batman-adv/log.c | 1 + net/batman-adv/main.c | 2 +- net/batman-adv/multicast.c | 2 +- net/batman-adv/netlink.c | 2 +- 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/sysfs.c | 2 +- net/batman-adv/tp_meter.c | 2 +- net/batman-adv/translation-table.c | 2 +- net/batman-adv/tvlv.c | 2 +- 22 files changed, 22 insertions(+), 20 deletions(-)
net/batman-adv/bat_iv_ogm.c +1 -1
@@ -29,7 +29,7 @@#include <linux/cache.h> #include <linux/errno.h> #include <linux/etherdevice.h> -#include <linux/fs.h> +#include <linux/gfp.h> #include <linux/if_ether.h> #include <linux/init.h> #include <linux/jiffies.h>
net/batman-adv/bat_v_elp.c +1 -1
@@ -27,7 +27,7 @@#include <linux/errno.h> #include <linux/etherdevice.h> #include <linux/ethtool.h> -#include <linux/fs.h> +#include <linux/gfp.h> #include <linux/if_ether.h> #include <linux/jiffies.h> #include <linux/kernel.h>
net/batman-adv/bat_v_ogm.c +1 -1
@@ -25,7 +25,7 @@#include <linux/byteorder/generic.h> #include <linux/errno.h> #include <linux/etherdevice.h> -#include <linux/fs.h> +#include <linux/gfp.h> #include <linux/if_ether.h> #include <linux/jiffies.h> #include <linux/kernel.h>
net/batman-adv/bridge_loop_avoidance.c +1 -1
@@ -27,7 +27,7 @@#include <linux/crc16.h> #include <linux/errno.h> #include <linux/etherdevice.h> -#include <linux/fs.h> +#include <linux/gfp.h> #include <linux/if_arp.h> #include <linux/if_ether.h> #include <linux/if_vlan.h>
net/batman-adv/distributed-arp-table.c +1 -1
@@ -26,7 +26,7 @@#include <linux/byteorder/generic.h> #include <linux/errno.h> #include <linux/etherdevice.h> -#include <linux/fs.h> +#include <linux/gfp.h> #include <linux/if_arp.h> #include <linux/if_ether.h> #include <linux/if_vlan.h>
net/batman-adv/fragmentation.c +1 -1
@@ -25,7 +25,7 @@#include <linux/byteorder/generic.h> #include <linux/errno.h> #include <linux/etherdevice.h> -#include <linux/fs.h> +#include <linux/gfp.h> #include <linux/if_ether.h> #include <linux/jiffies.h> #include <linux/kernel.h>
net/batman-adv/gateway_client.c +1 -1
@@ -25,7 +25,7 @@#include <linux/byteorder/generic.h> #include <linux/errno.h> #include <linux/etherdevice.h> -#include <linux/fs.h> +#include <linux/gfp.h> #include <linux/if_ether.h> #include <linux/if_vlan.h> #include <linux/in.h>
net/batman-adv/hard-interface.c +1 -1
@@ -25,7 +25,7 @@#include <linux/bug.h> #include <linux/byteorder/generic.h> #include <linux/errno.h> -#include <linux/fs.h> +#include <linux/gfp.h> #include <linux/if.h> #include <linux/if_arp.h> #include <linux/if_ether.h>
net/batman-adv/hash.c +1 -1
@@ -21,7 +21,7 @@#include "hash.h" #include "main.h" -#include <linux/fs.h> +#include <linux/gfp.h> #include <linux/lockdep.h> #include <linux/slab.h>
net/batman-adv/icmp_socket.c +1 -0
@@ -29,6 +29,7 @@#include <linux/export.h> #include <linux/fcntl.h> #include <linux/fs.h> +#include <linux/gfp.h> #include <linux/if_ether.h> #include <linux/kernel.h> #include <linux/list.h>
net/batman-adv/log.c +1 -0
@@ -27,6 +27,7 @@#include <linux/export.h> #include <linux/fcntl.h> #include <linux/fs.h> +#include <linux/gfp.h> #include <linux/jiffies.h> #include <linux/kernel.h> #include <linux/module.h>
net/batman-adv/main.c +1 -1
@@ -25,8 +25,8 @@#include <linux/byteorder/generic.h> #include <linux/crc32c.h> #include <linux/errno.h> -#include <linux/fs.h> #include <linux/genetlink.h> +#include <linux/gfp.h> #include <linux/if_ether.h> #include <linux/if_vlan.h> #include <linux/init.h>
net/batman-adv/multicast.c +1 -1
@@ -27,7 +27,7 @@#include <linux/byteorder/generic.h> #include <linux/errno.h> #include <linux/etherdevice.h> -#include <linux/fs.h> +#include <linux/gfp.h> #include <linux/icmpv6.h> #include <linux/if_bridge.h> #include <linux/if_ether.h>
net/batman-adv/netlink.c +1 -1
@@ -26,8 +26,8 @@#include <linux/cache.h> #include <linux/errno.h> #include <linux/export.h> -#include <linux/fs.h> #include <linux/genetlink.h> +#include <linux/gfp.h> #include <linux/if_ether.h> #include <linux/init.h> #include <linux/kernel.h>
net/batman-adv/network-coding.c +1 -1
@@ -28,7 +28,7 @@#include <linux/debugfs.h> #include <linux/errno.h> #include <linux/etherdevice.h> -#include <linux/fs.h> +#include <linux/gfp.h> #include <linux/if_ether.h> #include <linux/if_packet.h> #include <linux/init.h>
net/batman-adv/originator.c +1 -1
@@ -24,7 +24,7 @@#include <linux/atomic.h> #include <linux/errno.h> #include <linux/etherdevice.h> -#include <linux/fs.h> +#include <linux/gfp.h> #include <linux/jiffies.h> #include <linux/kernel.h> #include <linux/kref.h>
net/batman-adv/send.c +1 -1
@@ -26,7 +26,7 @@#include <linux/byteorder/generic.h> #include <linux/errno.h> #include <linux/etherdevice.h> -#include <linux/fs.h> +#include <linux/gfp.h> #include <linux/if.h> #include <linux/if_ether.h> #include <linux/jiffies.h>
net/batman-adv/soft-interface.c +1 -1
@@ -29,7 +29,7 @@#include <linux/errno.h> #include <linux/etherdevice.h> #include <linux/ethtool.h> -#include <linux/fs.h> +#include <linux/gfp.h> #include <linux/if_ether.h> #include <linux/if_vlan.h> #include <linux/jiffies.h>
net/batman-adv/sysfs.c +1 -1
@@ -25,7 +25,7 @@#include <linux/compiler.h> #include <linux/device.h> #include <linux/errno.h> -#include <linux/fs.h> +#include <linux/gfp.h> #include <linux/if.h> #include <linux/if_vlan.h> #include <linux/kernel.h>
net/batman-adv/tp_meter.c +1 -1
@@ -28,7 +28,7 @@#include <linux/compiler.h> #include <linux/err.h> #include <linux/etherdevice.h> -#include <linux/fs.h> +#include <linux/gfp.h> #include <linux/if_ether.h> #include <linux/init.h> #include <linux/jiffies.h>
net/batman-adv/translation-table.c +1 -1
@@ -30,7 +30,7 @@#include <linux/crc32c.h> #include <linux/errno.h> #include <linux/etherdevice.h> -#include <linux/fs.h> +#include <linux/gfp.h> #include <linux/if_ether.h> #include <linux/init.h> #include <linux/jhash.h>
net/batman-adv/tvlv.c +1 -1
@@ -22,7 +22,7 @@#include <linux/byteorder/generic.h> #include <linux/etherdevice.h> -#include <linux/fs.h> +#include <linux/gfp.h> #include <linux/if_ether.h> #include <linux/kernel.h> #include <linux/kref.h>
Signature · 1 line
2.11.0
Simon Wunderlich
maintainerPATCH 9/20 batman-adv: include build_bug.h for BUILD_BUG_ON define
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
commit bc6245e5efd7 ("bug: split BUILD_BUG stuff out into <linux/build_bug.h>") added a new header for BUILD_BUG_ON. It should therefore be included instead of linux/bug.h
--- compat-include/linux/build_bug.h | 34 ++++++++++++++++++++++++++++++++++ net/batman-adv/main.c | 2 +- net/batman-adv/tp_meter.c | 2 +- net/batman-adv/translation-table.c | 2 +- 4 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 compat-include/linux/build_bug.h
compat-include/linux/build_bug.h new file +34 -0
@@ -0,0 +1,34 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* Copyright (C) 2007-2017 B.A.T.M.A.N. contributors: +* +* Marek Lindner, Simon Wunderlich +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of version 2 of the GNU General Public +* License as published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, see <http://www.gnu.org/licenses/>. +* +* License-Filename: LICENSES/preferred/GPL-2.0 +* +* 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_CODE >=KERNEL_VERSION (4 ,13 ,0 ) +#include_next <linux/build_bug.h> +#else +#include <linux/bug.h> +#endif + +#endif /* _NET_BATMAN_ADV_COMPAT_LINUX_BUILD_BUG_H_ */
net/batman-adv/main.c +1 -1
@@ -21,7 +21,7 @@#include "main.h" #include <linux/atomic.h> -#include <linux/bug.h> +#include <linux/build_bug.h> #include <linux/byteorder/generic.h> #include <linux/crc32c.h> #include <linux/errno.h>
net/batman-adv/tp_meter.c +1 -1
@@ -22,7 +22,7 @@#include "main.h" #include <linux/atomic.h> -#include <linux/bug.h> +#include <linux/build_bug.h> #include <linux/byteorder/generic.h> #include <linux/cache.h> #include <linux/compiler.h>
net/batman-adv/translation-table.c +1 -1
@@ -23,7 +23,7 @@#include <linux/atomic.h> #include <linux/bitops.h> -#include <linux/bug.h> +#include <linux/build_bug.h> #include <linux/byteorder/generic.h> #include <linux/cache.h> #include <linux/compiler.h>
Signature · 1 line
2.11.0
A message that is not in the archive (sent off-list or not yet received): 20171215114320.13645-10-sw-2YrNx6rUIHYiY0qSoAWiAoQuADTiUCJX@public.gmane.org
Re: [PATCH 09/20] batman-adv: include build_bug.h for BUILD_BUG_ON define
Quoted 1 line · On Freitag, 15. Dezember 2017 12:43:09 CET Simon Wunderlich wrote:
compat-include/linux/build_bug.h | 34 ++++++++++++++++++++++++++++++++++
This backport change slipped in. Sorry, this was my fault when I initially integrating it.
Kind regards,
Sven
Simon Wunderlich
maintainerPATCH 10/20 batman-adv: Include net.h for net_ratelimited_function
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
The linux/net.h provides the net_ratelimited_function. It should therefore be included directly before it is used.
--- net/batman-adv/network-coding.c | 1 + net/batman-adv/translation-table.c | 1 + 2 files changed, 2 insertions(+)
net/batman-adv/network-coding.c +1 -0
@@ -38,6 +38,7 @@#include <linux/kref.h> #include <linux/list.h> #include <linux/lockdep.h> +#include <linux/net.h> #include <linux/netdevice.h> #include <linux/printk.h> #include <linux/random.h>
net/batman-adv/translation-table.c +1 -0
@@ -39,6 +39,7 @@#include <linux/kref.h> #include <linux/list.h> #include <linux/lockdep.h> +#include <linux/net.h> #include <linux/netdevice.h> #include <linux/netlink.h> #include <linux/rculist.h>
Signature · 1 line
2.11.0
Simon Wunderlich
maintainerPATCH 11/20 batman-adv: include kobject.h for kobject_* functions
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
The linux/kobject.h provides the kobject_* function declarations and should therefore be included directly before they are used.
--- net/batman-adv/sysfs.c | 1 + 1 file changed, 1 insertion(+)
net/batman-adv/sysfs.c +1 -0
@@ -29,6 +29,7 @@#include <linux/if.h> #include <linux/if_vlan.h> #include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/kref.h> #include <linux/netdevice.h> #include <linux/printk.h>
Signature · 1 line
2.11.0
Simon Wunderlich
maintainerPATCH 12/20 batman-adv: Remove unused sched.h include
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
The linux/wait.h include was removed with commit 421d988b2c08 ("batman-adv:
Consolidate logging related functions"). The previously required (but not unused) linux/sched.h include can also be dropped now.
--- net/batman-adv/debugfs.c | 1 - 1 file changed, 1 deletion(-)
net/batman-adv/debugfs.c +0 -1
@@ -28,7 +28,6 @@#include <linux/fs.h> #include <linux/netdevice.h> #include <linux/printk.h> -#include <linux/sched.h> /* for linux/wait.h */ #include <linux/seq_file.h> #include <linux/stat.h> #include <linux/stddef.h>
Signature · 1 line
2.11.0
Simon Wunderlich
maintainerPATCH 13/20 batman-adv: Add missing kernel-doc to packet.h
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
--- net/batman-adv/packet.h | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-)
net/batman-adv/packet.h +23 -2
@@ -24,6 +24,12 @@#include <asm/byteorder.h> #include <linux/types.h> +/** +* batadv_tp_is_error() - Check throughput meter return code for error +* @n: throughput meter return code +* +* Return: 0 when not error was detected, != 0 otherwise +*/ #define batadv_tp_is_error (n) ((u8)(n) > 127 ? 1 : 0)/**
@@ -91,7 +97,15 @@ enum batadv_iv_flags { BATADV_DIRECTLINK = BIT(2), }; -/* ICMP message types */ +/** +* enum batadv_icmp_packettype - ICMP message types +* @BATADV_ECHO_REPLY: success reply to BATADV_ECHO_REQUEST +* @BATADV_DESTINATION_UNREACHABLE: failure when route to destination not found +* @BATADV_ECHO_REQUEST: request BATADV_ECHO_REPLY from destination +* @BATADV_TTL_EXCEEDED: error after BATADV_ECHO_REQUEST traversed too many hops +* @BATADV_PARAMETER_PROBLEM: return code for malformed messages +* @BATADV_TP: throughput meter packet +*/ enum batadv_icmp_packettype {BATADV_ECHO_REPLY =0 ,BATADV_DESTINATION_UNREACHABLE =3 ,
@@ -139,7 +153,14 @@ enum batadv_vlan_flags { BATADV_VLAN_HAS_TAG = BIT(15), }; -/* claim frame types for the bridge loop avoidance */ +/** +* enum batadv_bla_claimframe - claim frame types for the bridge loop avoidance +* @BATADV_CLAIM_TYPE_CLAIM: claim of a client mac address +* @BATADV_CLAIM_TYPE_UNCLAIM: unclaim of a client mac address +* @BATADV_CLAIM_TYPE_ANNOUNCE: announcement of backbone with current crc +* @BATADV_CLAIM_TYPE_REQUEST: request of full claim table +* @BATADV_CLAIM_TYPE_LOOPDETECT: mesh-traversing loop detect packet +*/ enum batadv_bla_claimframe {BATADV_CLAIM_TYPE_CLAIM =0x00 ,BATADV_CLAIM_TYPE_UNCLAIM =0x01 ,
Signature · 1 line
2.11.0
Simon Wunderlich
maintainerPATCH 14/20 batman-adv: Use parentheses in function kernel-doc
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
The documentation describing kernel-doc comments for functions ("How to format kernel-doc comments") uses parentheses at the end of the function name. Using this format allows to use a consistent style when adding documentation to a function and when referencing this function in a different kernel-doc section.
--- net/batman-adv/bat_algo.c | 7 +- net/batman-adv/bat_iv_ogm.c | 80 +++++++------- net/batman-adv/bat_v.c | 48 ++++----- net/batman-adv/bat_v_elp.c | 24 ++--- net/batman-adv/bat_v_ogm.c | 34 +++--- net/batman-adv/bitarray.c | 2 +- net/batman-adv/bitarray.h | 2 +- net/batman-adv/bridge_loop_avoidance.c | 109 ++++++++++--------- net/batman-adv/bridge_loop_avoidance.h | 4 +- net/batman-adv/debugfs.c | 12 +-- net/batman-adv/distributed-arp-table.c | 77 +++++++------- net/batman-adv/distributed-arp-table.h | 6 +- net/batman-adv/fragmentation.c | 20 ++-- net/batman-adv/fragmentation.h | 2 +- net/batman-adv/gateway_client.c | 24 +++-- net/batman-adv/gateway_common.c | 18 ++-- net/batman-adv/hard-interface.c | 26 ++--- net/batman-adv/hard-interface.h | 2 +- net/batman-adv/hash.h | 2 +- net/batman-adv/icmp_socket.c | 4 +- net/batman-adv/main.c | 16 +-- net/batman-adv/main.h | 6 +- net/batman-adv/multicast.c | 78 +++++++------- net/batman-adv/netlink.c | 22 ++-- net/batman-adv/network-coding.c | 120 +++++++++++---------- net/batman-adv/originator.c | 76 ++++++------- net/batman-adv/routing.c | 24 ++--- net/batman-adv/send.c | 45 ++++---- net/batman-adv/send.h | 4 +- net/batman-adv/soft-interface.c | 41 +++---- net/batman-adv/sysfs.c | 20 ++-- net/batman-adv/tp_meter.c | 70 ++++++------ net/batman-adv/translation-table.c | 189 +++++++++++++++++---------------- net/batman-adv/tvlv.c | 38 +++---- 34 files changed, 633 insertions(+), 619 deletions(-)
net/batman-adv/bat_algo.c +4 -3
@@ -40,7 +40,8 @@ char batadv_routing_algo[20] = "BATMAN_IV";static struct hlist_head batadv_algo_list;/** -* batadv_algo_init - Initialize batman-adv algorithm management data structures +* batadv_algo_init() - Initialize batman-adv algorithm management data +* structures */ void batadv_algo_init (void ) {
@@ -151,7 +152,7 @@ module_param_cb(routing_algo, &batadv_param_ops_ra, &batadv_param_string_ra, 0644);/** -* batadv_algo_dump_entry - fill in information about one supported routing +* batadv_algo_dump_entry() - fill in information about one supported routing * algorithm * @msg: netlink message to be sent back * @portid: Port to reply to
@@ -182,7 +183,7 @@ static int batadv_algo_dump_entry(struct sk_buff *msg, u32 portid, u32 seq, }/** -* batadv_algo_dump - fill in information about supported routing +* batadv_algo_dump() - fill in information about supported routing * algorithms * @msg: netlink message to be sent back * @cb: Parameters to the netlink request
net/batman-adv/bat_iv_ogm.c +41 -39
296 lines not on this page · raw message
net/batman-adv/bat_v.c +23 -25
186 lines not on this page · raw message
net/batman-adv/bat_v_elp.c +12 -12
@@ -55,7 +55,7 @@#include "send.h" /** -* batadv_v_elp_start_timer - restart timer for ELP periodic work +* batadv_v_elp_start_timer() - restart timer for ELP periodic work * @hard_iface: the interface for which the timer has to be reset */ static void batadv_v_elp_start_timer (struct batadv_hard_iface *hard_iface)
@@ -70,7 +70,7 @@ static void batadv_v_elp_start_timer(struct batadv_hard_iface *hard_iface) }/** -* batadv_v_elp_get_throughput - get the throughput towards a neighbour +* batadv_v_elp_get_throughput() - get the throughput towards a neighbour * @neigh: the neighbour for which the throughput has to be obtained * * Return: The throughput towards the given neighbour in multiples of 100kpbs
@@ -156,8 +156,8 @@ static u32 batadv_v_elp_get_throughput(struct batadv_hardif_neigh_node *neigh) }/** -* batadv_v_elp_throughput_metric_update - worker updating the throughput metric -* of a single hop neighbour +* batadv_v_elp_throughput_metric_update() - worker updating the throughput +* metric of a single hop neighbour * @work: the work queue item */ void batadv_v_elp_throughput_metric_update (struct work_struct *work)
@@ -180,7 +180,7 @@ void batadv_v_elp_throughput_metric_update(struct work_struct *work) }/** -* batadv_v_elp_wifi_neigh_probe - send link probing packets to a neighbour +* batadv_v_elp_wifi_neigh_probe() - send link probing packets to a neighbour * @neigh: the neighbour to probe * * Sends a predefined number of unicast wifi packets to a given neighbour in
@@ -243,7 +243,7 @@ batadv_v_elp_wifi_neigh_probe(struct batadv_hardif_neigh_node *neigh) }/** -* batadv_v_elp_periodic_work - ELP periodic task per interface +* batadv_v_elp_periodic_work() - ELP periodic task per interface * @work: work queue item * * Emits broadcast ELP message in regular intervals.
@@ -330,7 +330,7 @@ static void batadv_v_elp_periodic_work(struct work_struct *work) }/** -* batadv_v_elp_iface_enable - setup the ELP interface private resources +* batadv_v_elp_iface_enable() - setup the ELP interface private resources * @hard_iface: interface for which the data has to be prepared * * Return: 0 on success or a -ENOMEM in case of failure.
@@ -378,7 +378,7 @@ int batadv_v_elp_iface_enable(struct batadv_hard_iface *hard_iface) }/** -* batadv_v_elp_iface_disable - release ELP interface private resources +* batadv_v_elp_iface_disable() - release ELP interface private resources * @hard_iface: interface for which the resources have to be released */ void batadv_v_elp_iface_disable (struct batadv_hard_iface *hard_iface)
@@ -390,7 +390,7 @@ void batadv_v_elp_iface_disable(struct batadv_hard_iface *hard_iface) }/** -* batadv_v_elp_iface_activate - update the ELP buffer belonging to the given +* batadv_v_elp_iface_activate() - update the ELP buffer belonging to the given * hard-interface * @primary_iface: the new primary interface * @hard_iface: interface holding the to-be-updated buffer
@@ -411,7 +411,7 @@ void batadv_v_elp_iface_activate(struct batadv_hard_iface *primary_iface, }/** -* batadv_v_elp_primary_iface_set - change internal data to reflect the new +* batadv_v_elp_primary_iface_set() - change internal data to reflect the new * primary interface * @primary_iface: the new primary interface */
@@ -431,7 +431,7 @@ void batadv_v_elp_primary_iface_set(struct batadv_hard_iface *primary_iface) }/** -* batadv_v_elp_neigh_update - update an ELP neighbour node +* batadv_v_elp_neigh_update() - update an ELP neighbour node * @bat_priv: the bat priv with all the soft interface information * @neigh_addr: the neighbour interface address * @if_incoming: the interface the packet was received through
@@ -491,7 +491,7 @@ static void batadv_v_elp_neigh_update(struct batadv_priv *bat_priv, }/** -* batadv_v_elp_packet_recv - main ELP packet handler +* batadv_v_elp_packet_recv() - main ELP packet handler * @skb: the received packet * @if_incoming: the interface this packet was received through *
net/batman-adv/bat_v_ogm.c +17 -17
@@ -54,7 +54,7 @@#include "tvlv.h" /** -* batadv_v_ogm_orig_get - retrieve and possibly create an originator node +* batadv_v_ogm_orig_get() - retrieve and possibly create an originator node * @bat_priv: the bat priv with all the soft interface information * @addr: the address of the originator *
@@ -91,7 +91,7 @@ struct batadv_orig_node *batadv_v_ogm_orig_get(struct batadv_priv *bat_priv, }/** -* batadv_v_ogm_start_timer - restart the OGM sending timer +* batadv_v_ogm_start_timer() - restart the OGM sending timer * @bat_priv: the bat priv with all the soft interface information */ static void batadv_v_ogm_start_timer (struct batadv_priv *bat_priv)
@@ -110,7 +110,7 @@ static void batadv_v_ogm_start_timer(struct batadv_priv *bat_priv) }/** -* batadv_v_ogm_send_to_if - send a batman ogm using a given interface +* batadv_v_ogm_send_to_if() - send a batman ogm using a given interface * @skb: the OGM to send * @hard_iface: the interface to use to send the OGM */
@@ -130,7 +130,7 @@ static void batadv_v_ogm_send_to_if(struct sk_buff *skb, }/** -* batadv_v_ogm_send - periodic worker broadcasting the own OGM +* batadv_v_ogm_send() - periodic worker broadcasting the own OGM * @work: work queue item */ static void batadv_v_ogm_send (struct work_struct *work)
@@ -238,7 +238,7 @@ static void batadv_v_ogm_send(struct work_struct *work) }/** -* batadv_v_ogm_iface_enable - prepare an interface for B.A.T.M.A.N. V +* batadv_v_ogm_iface_enable() - prepare an interface for B.A.T.M.A.N. V * @hard_iface: the interface to prepare * * Takes care of scheduling own OGM sending routine for this interface.
@@ -255,7 +255,7 @@ int batadv_v_ogm_iface_enable(struct batadv_hard_iface *hard_iface) }/** -* batadv_v_ogm_primary_iface_set - set a new primary interface +* batadv_v_ogm_primary_iface_set() - set a new primary interface * @primary_iface: the new primary interface */ void batadv_v_ogm_primary_iface_set (struct batadv_hard_iface *primary_iface)
@@ -271,8 +271,8 @@ void batadv_v_ogm_primary_iface_set(struct batadv_hard_iface *primary_iface) }/** -* batadv_v_forward_penalty - apply a penalty to the throughput metric forwarded -* with B.A.T.M.A.N. V OGMs +* batadv_v_forward_penalty() - apply a penalty to the throughput metric +* forwarded with B.A.T.M.A.N. V OGMs * @bat_priv: the bat priv with all the soft interface information * @if_incoming: the interface where the OGM has been received * @if_outgoing: the interface where the OGM has to be forwarded to
@@ -317,7 +317,7 @@ static u32 batadv_v_forward_penalty(struct batadv_priv *bat_priv, }/** -* batadv_v_ogm_forward - check conditions and forward an OGM to the given +* batadv_v_ogm_forward() - check conditions and forward an OGM to the given * outgoing interface * @bat_priv: the bat priv with all the soft interface information * @ogm_received: previously received OGM to be forwarded
@@ -408,7 +408,7 @@ static void batadv_v_ogm_forward(struct batadv_priv *bat_priv, }/** -* batadv_v_ogm_metric_update - update route metric based on OGM +* batadv_v_ogm_metric_update() - update route metric based on OGM * @bat_priv: the bat priv with all the soft interface information * @ogm2: OGM2 structure * @orig_node: Originator structure for which the OGM has been received
@@ -493,7 +493,7 @@ static int batadv_v_ogm_metric_update(struct batadv_priv *bat_priv, }/** -* batadv_v_ogm_route_update - update routes based on OGM +* batadv_v_ogm_route_update() - update routes based on OGM * @bat_priv: the bat priv with all the soft interface information * @ethhdr: the Ethernet header of the OGM2 * @ogm2: OGM2 structure
@@ -593,7 +593,7 @@ static bool batadv_v_ogm_route_update(struct batadv_priv *bat_priv, }/** -* batadv_v_ogm_process_per_outif - process a batman v OGM for an outgoing if +* batadv_v_ogm_process_per_outif() - process a batman v OGM for an outgoing if * @bat_priv: the bat priv with all the soft interface information * @ethhdr: the Ethernet header of the OGM2 * @ogm2: OGM2 structure
@@ -642,7 +642,7 @@ batadv_v_ogm_process_per_outif(struct batadv_priv *bat_priv, }/** -* batadv_v_ogm_aggr_packet - checks if there is another OGM aggregated +* batadv_v_ogm_aggr_packet() - checks if there is another OGM aggregated * @buff_pos: current position in the skb * @packet_len: total length of the skb * @tvlv_len: tvlv length of the previously considered OGM
@@ -662,7 +662,7 @@ static bool batadv_v_ogm_aggr_packet(int buff_pos, int packet_len, }/** -* batadv_v_ogm_process - process an incoming batman v OGM +* batadv_v_ogm_process() - process an incoming batman v OGM * @skb: the skb containing the OGM * @ogm_offset: offset to the OGM which should be processed (for aggregates) * @if_incoming: the interface where this packet was receved
@@ -790,7 +790,7 @@ static void batadv_v_ogm_process(const struct sk_buff *skb, int ogm_offset, }/** -* batadv_v_ogm_packet_recv - OGM2 receiving handler +* batadv_v_ogm_packet_recv() - OGM2 receiving handler * @skb: the received OGM * @if_incoming: the interface where this OGM has been received *
@@ -854,7 +854,7 @@ int batadv_v_ogm_packet_recv(struct sk_buff *skb, }/** -* batadv_v_ogm_init - initialise the OGM2 engine +* batadv_v_ogm_init() - initialise the OGM2 engine * @bat_priv: the bat priv with all the soft interface information * * Return: 0 on success or a negative error code in case of failure
@@ -887,7 +887,7 @@ int batadv_v_ogm_init(struct batadv_priv *bat_priv) }/** -* batadv_v_ogm_free - free OGM private resources +* batadv_v_ogm_free() - free OGM private resources * @bat_priv: the bat priv with all the soft interface information */ void batadv_v_ogm_free (struct batadv_priv *bat_priv)
net/batman-adv/bitarray.c +1 -1
@@ -35,7 +35,7 @@ static void batadv_bitmap_shift_left(unsigned long *seq_bits, s32 n) }/** -* batadv_bit_get_packet - receive and process one packet within the sequence +* batadv_bit_get_packet() - receive and process one packet within the sequence * number window * @priv: the bat priv with all the soft interface information * @seq_bits: pointer to the sequence number receive packet
net/batman-adv/bitarray.h +1 -1
@@ -29,7 +29,7 @@#include <linux/types.h> /** -* batadv_test_bit - check if bit is set in the current window +* batadv_test_bit() - check if bit is set in the current window * * @seq_bits: pointer to the sequence number receive packet * @last_seqno: latest sequence number in seq_bits
net/batman-adv/bridge_loop_avoidance.c +54 -55
409 lines not on this page · raw message
net/batman-adv/bridge_loop_avoidance.h +2 -2
@@ -33,8 +33,8 @@ struct seq_file;struct sk_buff ;/** -* batadv_bla_is_loopdetect_mac - check if the mac address is from a loop detect -* frame sent by bridge loop avoidance +* batadv_bla_is_loopdetect_mac() - check if the mac address is from a loop +* detect frame sent by bridge loop avoidance * @mac: mac address to check * * Return: true if the it looks like a loop detect frame
net/batman-adv/debugfs.c +6 -6
@@ -68,8 +68,8 @@ static int batadv_originators_open(struct inode *inode, struct file *file) }/** -* batadv_originators_hardif_open - handles debugfs output for the -* originator table of an hard interface +* batadv_originators_hardif_open() - handles debugfs output for the originator +* table of an hard interface * @inode: inode pointer to debugfs file * @file: pointer to the seq_file *
@@ -119,7 +119,7 @@ static int batadv_bla_backbone_table_open(struct inode *inode,#ifdef CONFIG_BATMAN_ADV_DAT /** -* batadv_dat_cache_open - Prepare file handler for reads from dat_chache +* batadv_dat_cache_open() - Prepare file handler for reads from dat_chache * @inode: inode which was opened * @file: file handle to be initialized *
@@ -156,7 +156,7 @@ static int batadv_nc_nodes_open(struct inode *inode, struct file *file)#ifdef CONFIG_BATMAN_ADV_MCAST /** -* batadv_mcast_flags_open - prepare file handler for reads from mcast_flags +* batadv_mcast_flags_open() - prepare file handler for reads from mcast_flags * @inode: inode which was opened * @file: file handle to be initialized *
@@ -298,7 +298,7 @@ void batadv_debugfs_destroy(void) }/** -* batadv_debugfs_add_hardif - creates the base directory for a hard interface +* batadv_debugfs_add_hardif() - creates the base directory for a hard interface * in debugfs. * @hard_iface: hard interface which should be added. *
@@ -340,7 +340,7 @@ int batadv_debugfs_add_hardif(struct batadv_hard_iface *hard_iface) }/** -* batadv_debugfs_del_hardif - delete the base directory for a hard interface +* batadv_debugfs_del_hardif() - delete the base directory for a hard interface * in debugfs. * @hard_iface: hard interface which is deleted. */
net/batman-adv/distributed-arp-table.c +39 -38
281 lines not on this page · raw message
net/batman-adv/distributed-arp-table.h +3 -3
@@ -51,7 +51,7 @@ bool batadv_dat_drop_broadcast_packet(struct batadv_priv *bat_priv, struct batadv_forw_packet *forw_packet);/** -* batadv_dat_init_orig_node_addr - assign a DAT address to the orig_node +* batadv_dat_init_orig_node_addr() - assign a DAT address to the orig_node * @orig_node: the node to assign the DAT address to */ static inline void
@@ -64,7 +64,7 @@ batadv_dat_init_orig_node_addr(struct batadv_orig_node *orig_node) }/** -* batadv_dat_init_own_addr - assign a DAT address to the node itself +* batadv_dat_init_own_addr() - assign a DAT address to the node itself * @bat_priv: the bat priv with all the soft interface information * @primary_if: a pointer to the primary interface */
@@ -85,7 +85,7 @@ void batadv_dat_free(struct batadv_priv *bat_priv);int batadv_dat_cache_seq_print_text (struct seq_file *seq,void *offset);/** -* batadv_dat_inc_counter - increment the correct DAT packet counter +* batadv_dat_inc_counter() - increment the correct DAT packet counter * @bat_priv: the bat priv with all the soft interface information * @subtype: the 4addr subtype of the packet to be counted *
net/batman-adv/fragmentation.c +10 -10
@@ -44,7 +44,7 @@#include "soft-interface.h" /** -* batadv_frag_clear_chain - delete entries in the fragment buffer chain +* batadv_frag_clear_chain() - delete entries in the fragment buffer chain * @head: head of chain with entries. * @dropped: whether the chain is cleared because all fragments are dropped *
@@ -68,7 +68,7 @@ static void batadv_frag_clear_chain(struct hlist_head *head, bool dropped) }/** -* batadv_frag_purge_orig - free fragments associated to an orig +* batadv_frag_purge_orig() - free fragments associated to an orig * @orig_node: originator to free fragments from * @check_cb: optional function to tell if an entry should be purged */
@@ -92,7 +92,7 @@ void batadv_frag_purge_orig(struct batadv_orig_node *orig_node, }/** -* batadv_frag_size_limit - maximum possible size of packet to be fragmented +* batadv_frag_size_limit() - maximum possible size of packet to be fragmented * * Return: the maximum size of payload that can be fragmented. */
@@ -107,7 +107,7 @@ static int batadv_frag_size_limit(void) }/** -* batadv_frag_init_chain - check and prepare fragment chain for new fragment +* batadv_frag_init_chain() - check and prepare fragment chain for new fragment * @chain: chain in fragments table to init * @seqno: sequence number of the received fragment *
@@ -137,7 +137,7 @@ static bool batadv_frag_init_chain(struct batadv_frag_table_entry *chain, }/** -* batadv_frag_insert_packet - insert a fragment into a fragment chain +* batadv_frag_insert_packet() - insert a fragment into a fragment chain * @orig_node: originator that the fragment was received from * @skb: skb to insert * @chain_out: list head to attach complete chains of fragments to
@@ -251,7 +251,7 @@ static bool batadv_frag_insert_packet(struct batadv_orig_node *orig_node, }/** -* batadv_frag_merge_packets - merge a chain of fragments +* batadv_frag_merge_packets() - merge a chain of fragments * @chain: head of chain with fragments * * Expand the first skb in the chain and copy the content of the remaining
@@ -309,7 +309,7 @@ batadv_frag_merge_packets(struct hlist_head *chain) }/** -* batadv_frag_skb_buffer - buffer fragment for later merge +* batadv_frag_skb_buffer() - buffer fragment for later merge * @skb: skb to buffer * @orig_node_src: originator that the skb is received from *
@@ -349,7 +349,7 @@ bool batadv_frag_skb_buffer(struct sk_buff **skb, }/** -* batadv_frag_skb_fwd - forward fragments that would exceed MTU when merged +* batadv_frag_skb_fwd() - forward fragments that would exceed MTU when merged * @skb: skb to forward * @recv_if: interface that the skb is received on * @orig_node_src: originator that the skb is received from
@@ -403,7 +403,7 @@ bool batadv_frag_skb_fwd(struct sk_buff *skb, }/** -* batadv_frag_create - create a fragment from skb +* batadv_frag_create() - create a fragment from skb * @skb: skb to create fragment from * @frag_head: header to use in new fragment * @fragment_size: size of new fragment
@@ -441,7 +441,7 @@ static struct sk_buff *batadv_frag_create(struct sk_buff *skb, }/** -* batadv_frag_send_packet - create up to 16 fragments from the passed skb +* batadv_frag_send_packet() - create up to 16 fragments from the passed skb * @skb: skb to create fragments from * @orig_node: final destination of the created fragments * @neigh_node: next-hop of the created fragments
net/batman-adv/fragmentation.h +1 -1
@@ -42,7 +42,7 @@ int batadv_frag_send_packet(struct sk_buff *skb, struct batadv_neigh_node *neigh_node);/** -* batadv_frag_check_entry - check if a list of fragments has timed out +* batadv_frag_check_entry() - check if a list of fragments has timed out * @frags_entry: table entry to check * * Return: true if the frags entry has timed out, false otherwise.
net/batman-adv/gateway_client.c +13 -11
@@ -71,8 +71,8 @@#define BATADV_DHCP_CHADDR_OFFSET 28/** -* batadv_gw_node_release - release gw_node from lists and queue for free after -* rcu grace period +* batadv_gw_node_release() - release gw_node from lists and queue for free +* after rcu grace period * @ref: kref pointer of the gw_node */ static void batadv_gw_node_release (struct kref *ref)
@@ -86,7 +86,8 @@ static void batadv_gw_node_release(struct kref *ref) }/** -* batadv_gw_node_put - decrement the gw_node refcounter and possibly release it +* batadv_gw_node_put() - decrement the gw_node refcounter and possibly release +* it * @gw_node: gateway node to free */ void batadv_gw_node_put (struct batadv_gw_node *gw_node)
@@ -158,7 +159,7 @@ static void batadv_gw_select(struct batadv_priv *bat_priv, }/** -* batadv_gw_reselect - force a gateway reselection +* batadv_gw_reselect() - force a gateway reselection * @bat_priv: the bat priv with all the soft interface information * * Set a flag to remind the GW component to perform a new gateway reselection.
@@ -174,7 +175,7 @@ void batadv_gw_reselect(struct batadv_priv *bat_priv) }/** -* batadv_gw_check_client_stop - check if client mode has been switched off +* batadv_gw_check_client_stop() - check if client mode has been switched off * @bat_priv: the bat priv with all the soft interface information * * This function assumes the caller has checked that the gw state *is actually
@@ -324,7 +325,7 @@ void batadv_gw_check_election(struct batadv_priv *bat_priv, }/** -* batadv_gw_node_add - add gateway node to list of available gateways +* batadv_gw_node_add() - add gateway node to list of available gateways * @bat_priv: the bat priv with all the soft interface information * @orig_node: originator announcing gateway capabilities * @gateway: announced bandwidth information
@@ -367,7 +368,7 @@ static void batadv_gw_node_add(struct batadv_priv *bat_priv, }/** -* batadv_gw_node_get - retrieve gateway node from list of available gateways +* batadv_gw_node_get() - retrieve gateway node from list of available gateways * @bat_priv: the bat priv with all the soft interface information * @orig_node: originator announcing gateway capabilities *
@@ -396,7 +397,7 @@ struct batadv_gw_node *batadv_gw_node_get(struct batadv_priv *bat_priv, }/** -* batadv_gw_node_update - update list of available gateways with changed +* batadv_gw_node_update() - update list of available gateways with changed * bandwidth information * @bat_priv: the bat priv with all the soft interface information * @orig_node: originator announcing gateway capabilities
@@ -517,7 +518,7 @@ int batadv_gw_client_seq_print_text(struct seq_file *seq, void *offset)#endif /** -* batadv_gw_dump - Dump gateways into a message +* batadv_gw_dump() - Dump gateways into a message * @msg: Netlink message to dump into * @cb: Control block containing additional options *
@@ -570,7 +571,7 @@ int batadv_gw_dump(struct sk_buff *msg, struct netlink_callback *cb) }/** -* batadv_gw_dhcp_recipient_get - check if a packet is a DHCP message +* batadv_gw_dhcp_recipient_get() - check if a packet is a DHCP message * @skb: the packet to check * @header_len: a pointer to the batman-adv header size * @chaddr: buffer where the client address will be stored. Valid
@@ -689,7 +690,8 @@ batadv_gw_dhcp_recipient_get(struct sk_buff *skb, unsigned int *header_len, }/** -* batadv_gw_out_of_range - check if the dhcp request destination is the best gw +* batadv_gw_out_of_range() - check if the dhcp request destination is the best +* gateway * @bat_priv: the bat priv with all the soft interface information * @skb: the outgoing packet *
net/batman-adv/gateway_common.c +9 -9
@@ -36,8 +36,8 @@#include "tvlv.h" /** -* batadv_parse_throughput - parse supplied string buffer to extract throughput -* information +* batadv_parse_throughput() - parse supplied string buffer to extract +* throughput information * @net_dev: the soft interface net device * @buff: string buffer to parse * @description: text shown when throughput string cannot be parsed
@@ -103,8 +103,8 @@ bool batadv_parse_throughput(struct net_device *net_dev, char *buff, }/** -* batadv_parse_gw_bandwidth - parse supplied string buffer to extract download -* and upload bandwidth information +* batadv_parse_gw_bandwidth() - parse supplied string buffer to extract +* download and upload bandwidth information * @net_dev: the soft interface net device * @buff: string buffer to parse * @down: pointer holding the returned download bandwidth information
@@ -139,8 +139,8 @@ static bool batadv_parse_gw_bandwidth(struct net_device *net_dev, char *buff, }/** -* batadv_gw_tvlv_container_update - update the gw tvlv container after gateway -* setting change +* batadv_gw_tvlv_container_update() - update the gw tvlv container after +* gateway setting change * @bat_priv: the bat priv with all the soft interface information */ void batadv_gw_tvlv_container_update (struct batadv_priv *bat_priv)
@@ -210,7 +210,7 @@ ssize_t batadv_gw_bandwidth_set(struct net_device *net_dev, char *buff, }/** -* batadv_gw_tvlv_ogm_handler_v1 - process incoming gateway tvlv container +* batadv_gw_tvlv_ogm_handler_v1() - process incoming gateway tvlv container * @bat_priv: the bat priv with all the soft interface information * @orig: the orig_node of the ogm * @flags: flags indicating the tvlv state (see batadv_tvlv_handler_flags)
@@ -251,7 +251,7 @@ static void batadv_gw_tvlv_ogm_handler_v1(struct batadv_priv *bat_priv, }/** -* batadv_gw_init - initialise the gateway handling internals +* batadv_gw_init() - initialise the gateway handling internals * @bat_priv: the bat priv with all the soft interface information */ void batadv_gw_init (struct batadv_priv *bat_priv)
@@ -267,7 +267,7 @@ void batadv_gw_init(struct batadv_priv *bat_priv) }/** -* batadv_gw_free - free the gateway handling internals +* batadv_gw_free() - free the gateway handling internals * @bat_priv: the bat priv with all the soft interface information */ void batadv_gw_free (struct batadv_priv *bat_priv)
net/batman-adv/hard-interface.c +13 -13
@@ -55,7 +55,7 @@#include "translation-table.h" /** -* batadv_hardif_release - release hard interface from lists and queue for +* batadv_hardif_release() - release hard interface from lists and queue for * free after rcu grace period * @ref: kref pointer of the hard interface */
@@ -89,7 +89,7 @@ batadv_hardif_get_by_netdev(const struct net_device *net_dev) }/** -* batadv_getlink_net - return link net namespace (of use fallback) +* batadv_getlink_net() - return link net namespace (of use fallback) * @netdev: net_device to check * @fallback_net: return in case get_link_net is not available for @netdev *
@@ -108,7 +108,7 @@ static struct net *batadv_getlink_net(const struct net_device *netdev, }/** -* batadv_mutual_parents - check if two devices are each others parent +* batadv_mutual_parents() - check if two devices are each others parent * @dev1: 1st net dev * @net1: 1st devices netns * @dev2: 2nd net dev
@@ -141,7 +141,7 @@ static bool batadv_mutual_parents(const struct net_device *dev1, }/** -* batadv_is_on_batman_iface - check if a device is a batman iface descendant +* batadv_is_on_batman_iface() - check if a device is a batman iface descendant * @net_dev: the device to check * * If the user creates any virtual device on top of a batman-adv interface, it
@@ -205,7 +205,7 @@ static bool batadv_is_valid_iface(const struct net_device *net_dev) }/** -* batadv_get_real_netdevice - check if the given netdev struct is a virtual +* batadv_get_real_netdevice() - check if the given netdev struct is a virtual * interface on top of another 'real' interface * @netdev: the device to check *
@@ -249,7 +249,7 @@ static struct net_device *batadv_get_real_netdevice(struct net_device *netdev) }/** -* batadv_get_real_netdev - check if the given net_device struct is a virtual +* batadv_get_real_netdev() - check if the given net_device struct is a virtual * interface on top of another 'real' interface * @net_device: the device to check *
@@ -268,7 +268,7 @@ struct net_device *batadv_get_real_netdev(struct net_device *net_device) }/** -* batadv_is_wext_netdev - check if the given net_device struct is a +* batadv_is_wext_netdev() - check if the given net_device struct is a * wext wifi interface * @net_device: the device to check *
@@ -292,7 +292,7 @@ static bool batadv_is_wext_netdev(struct net_device *net_device) }/** -* batadv_is_cfg80211_netdev - check if the given net_device struct is a +* batadv_is_cfg80211_netdev() - check if the given net_device struct is a * cfg80211 wifi interface * @net_device: the device to check *
@@ -312,7 +312,7 @@ static bool batadv_is_cfg80211_netdev(struct net_device *net_device) }/** -* batadv_wifi_flags_evaluate - calculate wifi flags for net_device +* batadv_wifi_flags_evaluate() - calculate wifi flags for net_device * @net_device: the device to check * * Return: batadv_hard_iface_wifi_flags flags of the device
@@ -347,7 +347,7 @@ static u32 batadv_wifi_flags_evaluate(struct net_device *net_device) }/** -* batadv_is_cfg80211_hardif - check if the given hardif is a cfg80211 wifi +* batadv_is_cfg80211_hardif() - check if the given hardif is a cfg80211 wifi * interface * @hard_iface: the device to check *
@@ -365,7 +365,7 @@ bool batadv_is_cfg80211_hardif(struct batadv_hard_iface *hard_iface) }/** -* batadv_is_wifi_hardif - check if the given hardif is a wifi interface +* batadv_is_wifi_hardif() - check if the given hardif is a wifi interface * @hard_iface: the device to check * * Return: true if the net device is a 802.11 wireless device, false otherwise.
@@ -379,7 +379,7 @@ bool batadv_is_wifi_hardif(struct batadv_hard_iface *hard_iface) }/** -* batadv_hardif_no_broadcast - check whether (re)broadcast is necessary +* batadv_hardif_no_broadcast() - check whether (re)broadcast is necessary * @if_outgoing: the outgoing interface checked and considered for (re)broadcast * @orig_addr: the originator of this packet * @orig_neigh: originator address of the forwarder we just got the packet from
@@ -670,7 +670,7 @@ batadv_hardif_deactivate_interface(struct batadv_hard_iface *hard_iface) }/** -* batadv_master_del_slave - remove hard_iface from the current master interface +* batadv_master_del_slave() - remove hard_iface from the current master iface * @slave: the interface enslaved in another master * @master: the master from which slave has to be removed *
net/batman-adv/hard-interface.h +1 -1
@@ -85,7 +85,7 @@ int batadv_hardif_no_broadcast(struct batadv_hard_iface *if_outgoing, u8 *orig_addr, u8 *orig_neigh);/** -* batadv_hardif_put - decrement the hard interface refcounter and possibly +* batadv_hardif_put() - decrement the hard interface refcounter and possibly * release it * @hard_iface: the hard interface to free */
net/batman-adv/hash.h +1 -1
@@ -65,7 +65,7 @@ void batadv_hash_set_lock_class(struct batadv_hashtable *hash,void batadv_hash_destroy (struct batadv_hashtable *hash);/** -* batadv_hash_add - adds data to the hashtable +* batadv_hash_add() - adds data to the hashtable * @hash: storage hash table * @compare: callback to determine if 2 hash elements are identical * @choose: callback calculating the hash index
net/batman-adv/icmp_socket.c +2 -2
@@ -337,7 +337,7 @@ int batadv_socket_setup(struct batadv_priv *bat_priv) }/** -* batadv_socket_add_packet - schedule an icmp packet to be sent to +* batadv_socket_add_packet() - schedule an icmp packet to be sent to * userspace on an icmp socket. * @socket_client: the socket this packet belongs to * @icmph: pointer to the header of the icmp packet
@@ -394,7 +394,7 @@ static void batadv_socket_add_packet(struct batadv_socket_client *socket_client, }/** -* batadv_socket_receive_packet - schedule an icmp packet to be received +* batadv_socket_receive_packet() - schedule an icmp packet to be received * locally and sent to userspace. * @icmph: pointer to the header of the icmp packet * @icmp_len: total length of the icmp packet
net/batman-adv/main.c +8 -8
@@ -258,8 +258,8 @@ void batadv_mesh_free(struct net_device *soft_iface) }/** -* batadv_is_my_mac - check if the given mac address belongs to any of the real -* interfaces in the current mesh +* batadv_is_my_mac() - check if the given mac address belongs to any of the +* real interfaces in the current mesh * @bat_priv: the bat priv with all the soft interface information * @addr: the address to check *
@@ -289,7 +289,7 @@ bool batadv_is_my_mac(struct batadv_priv *bat_priv, const u8 *addr)#ifdef CONFIG_BATMAN_ADV_DEBUGFS /** -* batadv_seq_print_text_primary_if_get - called from debugfs table printing +* batadv_seq_print_text_primary_if_get() - called from debugfs table printing * function that requires the primary interface * @seq: debugfs table seq_file struct *
@@ -326,7 +326,7 @@ batadv_seq_print_text_primary_if_get(struct seq_file *seq)#endif /** -* batadv_max_header_len - calculate maximum encapsulation overhead for a +* batadv_max_header_len() - calculate maximum encapsulation overhead for a * payload packet * * Return: the maximum encapsulation overhead in bytes.
@@ -351,7 +351,7 @@ int batadv_max_header_len(void) }/** -* batadv_skb_set_priority - sets skb priority according to packet content +* batadv_skb_set_priority() - sets skb priority according to packet content * @skb: the packet to be sent * @offset: offset to the packet content *
@@ -561,7 +561,7 @@ void batadv_recv_handler_unregister(u8 packet_type) }/** -* batadv_skb_crc32 - calculate CRC32 of the whole packet and skip bytes in +* batadv_skb_crc32() - calculate CRC32 of the whole packet and skip bytes in * the header * @skb: skb pointing to fragmented socket buffers * @payload_ptr: Pointer to position inside the head buffer of the skb
@@ -594,7 +594,7 @@ __be32 batadv_skb_crc32(struct sk_buff *skb, u8 *payload_ptr) }/** -* batadv_get_vid - extract the VLAN identifier from skb if any +* batadv_get_vid() - extract the VLAN identifier from skb if any * @skb: the buffer containing the packet * @header_len: length of the batman header preceding the ethernet header *
@@ -621,7 +621,7 @@ unsigned short batadv_get_vid(struct sk_buff *skb, size_t header_len) }/** -* batadv_vlan_ap_isola_get - return the AP isolation status for the given vlan +* batadv_vlan_ap_isola_get() - return AP isolation status for the given vlan * @bat_priv: the bat priv with all the soft interface information * @vid: the VLAN identifier for which the AP isolation attributed as to be * looked up
net/batman-adv/main.h +3 -3
@@ -205,7 +205,7 @@ struct seq_file;struct sk_buff ;/** -* batadv_print_vid - return printable version of vid information +* batadv_print_vid() - return printable version of vid information * @vid: the VLAN identifier * * Return: -1 when no VLAN is used, VLAN id otherwise
@@ -241,7 +241,7 @@ void batadv_recv_handler_unregister(u8 packet_type);__be32 batadv_skb_crc32 (struct sk_buff *skb,u8 *payload_ptr);/** -* batadv_compare_eth - Compare two not u16 aligned Ethernet addresses +* batadv_compare_eth() - Compare two not u16 aligned Ethernet addresses * @data1: Pointer to a six-byte array containing the Ethernet address * @data2: Pointer other six-byte array containing the Ethernet address *
@@ -255,7 +255,7 @@ static inline bool batadv_compare_eth(const void *data1, const void *data2) }/** -* batadv_has_timed_out - compares current time (jiffies) and timestamp + +* batadv_has_timed_out() - compares current time (jiffies) and timestamp + * timeout * @timestamp: base value to compare with (in jiffies) * @timeout: added to base value before comparing (in milliseconds)
net/batman-adv/multicast.c +41 -37
300 lines not on this page · raw message
net/batman-adv/netlink.c +11 -11
@@ -102,7 +102,7 @@ static const struct nla_policy batadv_netlink_policy[NUM_BATADV_ATTR] = { };/** -* batadv_netlink_get_ifindex - Extract an interface index from a message +* batadv_netlink_get_ifindex() - Extract an interface index from a message * @nlh: Message header * @attrtype: Attribute which holds an interface index *
@@ -117,7 +117,7 @@ batadv_netlink_get_ifindex(const struct nlmsghdr *nlh, int attrtype) }/** -* batadv_netlink_mesh_info_put - fill in generic information about mesh +* batadv_netlink_mesh_info_put() - fill in generic information about mesh * interface * @msg: netlink message to be sent back * @soft_iface: interface for which the data should be taken
@@ -172,7 +172,7 @@ batadv_netlink_mesh_info_put(struct sk_buff *msg, struct net_device *soft_iface) }/** -* batadv_netlink_get_mesh_info - handle incoming BATADV_CMD_GET_MESH_INFO +* batadv_netlink_get_mesh_info() - handle incoming BATADV_CMD_GET_MESH_INFO * netlink request * @skb: received netlink message * @info: receiver information
@@ -233,7 +233,7 @@ batadv_netlink_get_mesh_info(struct sk_buff *skb, struct genl_info *info) }/** -* batadv_netlink_tp_meter_put - Fill information of started tp_meter session +* batadv_netlink_tp_meter_put() - Fill information of started tp_meter session * @msg: netlink message to be sent back * @cookie: tp meter session cookie *
@@ -249,7 +249,7 @@ batadv_netlink_tp_meter_put(struct sk_buff *msg, u32 cookie) }/** -* batadv_netlink_tpmeter_notify - send tp_meter result via netlink to client +* batadv_netlink_tpmeter_notify() - send tp_meter result via netlink to client * @bat_priv: the bat priv with all the soft interface information * @dst: destination of tp_meter session * @result: reason for tp meter session stop
@@ -312,7 +312,7 @@ int batadv_netlink_tpmeter_notify(struct batadv_priv *bat_priv, const u8 *dst, }/** -* batadv_netlink_tp_meter_start - Start a new tp_meter session +* batadv_netlink_tp_meter_start() - Start a new tp_meter session * @skb: received netlink message * @info: receiver information *
@@ -389,7 +389,7 @@ batadv_netlink_tp_meter_start(struct sk_buff *skb, struct genl_info *info) }/** -* batadv_netlink_tp_meter_start - Cancel a running tp_meter session +* batadv_netlink_tp_meter_start() - Cancel a running tp_meter session * @skb: received netlink message * @info: receiver information *
@@ -434,7 +434,7 @@ batadv_netlink_tp_meter_cancel(struct sk_buff *skb, struct genl_info *info) }/** -* batadv_netlink_dump_hardif_entry - Dump one hard interface into a message +* batadv_netlink_dump_hardif_entry() - Dump one hard interface into a message * @msg: Netlink message to dump into * @portid: Port making netlink request * @seq: Sequence number of netlink message
@@ -476,7 +476,7 @@ batadv_netlink_dump_hardif_entry(struct sk_buff *msg, u32 portid, u32 seq, }/** -* batadv_netlink_dump_hardifs - Dump all hard interface into a messages +* batadv_netlink_dump_hardifs() - Dump all hard interface into a messages * @msg: Netlink message to dump into * @cb: Parameters from query *
@@ -623,7 +623,7 @@ struct genl_family batadv_netlink_family __ro_after_init = { };/** -* batadv_netlink_register - register batadv genl netlink family +* batadv_netlink_register() - register batadv genl netlink family */ void __init batadv_netlink_register (void ) {
@@ -635,7 +635,7 @@ void __init batadv_netlink_register(void) }/** -* batadv_netlink_unregister - unregister batadv genl netlink family +* batadv_netlink_unregister() - unregister batadv genl netlink family */ void batadv_netlink_unregister (void ) {
net/batman-adv/network-coding.c +61 -59
432 lines not on this page · raw message
net/batman-adv/originator.c +38 -38
227 lines not on this page · raw message
net/batman-adv/send.c +23 -22
45 lines not on this page · raw message
net/batman-adv/soft-interface.c +21 -20
41 lines not on this page · raw message
net/batman-adv/tp_meter.c +36 -34
70 lines not on this page · raw message
net/batman-adv/translation-table.c +95 -94
189 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.11.0
Part of the diff is not shown here. View the raw message.
Simon Wunderlich
maintainerPATCH 15/20 batman-adv: Use inline kernel-doc for enum/struct
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
The inline kernel-doc comments make it easier to keep changes to the struct/enum synchronized with the documentation of the it. And it makes it easier for larger structures like struct batadv_priv to read the documentation inside the code.
--- net/batman-adv/bat_iv_ogm.c | 17 +- net/batman-adv/gateway_common.h | 5 +- net/batman-adv/hard-interface.h | 27 +- net/batman-adv/log.h | 26 +- net/batman-adv/multicast.h | 16 +- net/batman-adv/types.h | 1989 +++++++++++++++++++++++++++------------ 6 files changed, 1444 insertions(+), 636 deletions(-)
net/batman-adv/bat_iv_ogm.c +12 -5
@@ -75,16 +75,23 @@ static void batadv_iv_send_outstanding_bat_ogm_packet(struct work_struct *work);/** * enum batadv_dup_status - duplicate status -* @BATADV_NO_DUP: the packet is no duplicate -* @BATADV_ORIG_DUP: OGM is a duplicate in the originator (but not for the -* neighbor) -* @BATADV_NEIGH_DUP: OGM is a duplicate for the neighbor -* @BATADV_PROTECTED: originator is currently protected (after reboot) */ enum batadv_dup_status { +/** @BATADV_NO_DUP: the packet is no duplicate */ BATADV_NO_DUP =0 , + +/** +* @BATADV_ORIG_DUP: OGM is a duplicate in the originator (but not for +* the neighbor) +*/ BATADV_ORIG_DUP , + +/** @BATADV_NEIGH_DUP: OGM is a duplicate for the neighbor */ BATADV_NEIGH_DUP , + +/** +* @BATADV_PROTECTED: originator is currently protected (after reboot) +*/ BATADV_PROTECTED , };
net/batman-adv/gateway_common.h +3 -2
@@ -35,11 +35,12 @@ enum batadv_gw_modes {/** * enum batadv_bandwidth_units - bandwidth unit types -* @BATADV_BW_UNIT_KBIT: unit type kbit -* @BATADV_BW_UNIT_MBIT: unit type mbit */ enum batadv_bandwidth_units { +/** @BATADV_BW_UNIT_KBIT: unit type kbit */ BATADV_BW_UNIT_KBIT , + +/** @BATADV_BW_UNIT_MBIT: unit type mbit */ BATADV_BW_UNIT_MBIT , };
net/batman-adv/hard-interface.h +21 -6
@@ -44,25 +44,40 @@ enum batadv_hard_if_state {/** * enum batadv_hard_if_bcast - broadcast avoidance options -* @BATADV_HARDIF_BCAST_OK: Do broadcast on according hard interface -* @BATADV_HARDIF_BCAST_NORECIPIENT: Broadcast not needed, there is no recipient -* @BATADV_HARDIF_BCAST_DUPFWD: There is just the neighbor we got it from -* @BATADV_HARDIF_BCAST_DUPORIG: There is just the originator */ enum batadv_hard_if_bcast { +/** @BATADV_HARDIF_BCAST_OK: Do broadcast on according hard interface */ BATADV_HARDIF_BCAST_OK =0 , + +/** +* @BATADV_HARDIF_BCAST_NORECIPIENT: Broadcast not needed, there is no +* recipient +*/ BATADV_HARDIF_BCAST_NORECIPIENT , + +/** +* @BATADV_HARDIF_BCAST_DUPFWD: There is just the neighbor we got it +* from +*/ BATADV_HARDIF_BCAST_DUPFWD , + +/** @BATADV_HARDIF_BCAST_DUPORIG: There is just the originator */ BATADV_HARDIF_BCAST_DUPORIG , };/** * enum batadv_hard_if_cleanup - Cleanup modi for soft_iface after slave removal -* @BATADV_IF_CLEANUP_KEEP: Don't automatically delete soft-interface -* @BATADV_IF_CLEANUP_AUTO: Delete soft-interface after last slave was removed */ enum batadv_hard_if_cleanup { +/** +* @BATADV_IF_CLEANUP_KEEP: Don't automatically delete soft-interface +*/ BATADV_IF_CLEANUP_KEEP , + +/** +* @BATADV_IF_CLEANUP_AUTO: Delete soft-interface after last slave was +* removed +*/ BATADV_IF_CLEANUP_AUTO , };
net/batman-adv/log.h +17 -9
@@ -47,25 +47,33 @@ static inline void batadv_debug_log_cleanup(struct batadv_priv *bat_priv)/** * enum batadv_dbg_level - available log levels -* @BATADV_DBG_BATMAN: OGM and TQ computations related messages -* @BATADV_DBG_ROUTES: route added / changed / deleted -* @BATADV_DBG_TT: translation table messages -* @BATADV_DBG_BLA: bridge loop avoidance messages -* @BATADV_DBG_DAT: ARP snooping and DAT related messages -* @BATADV_DBG_NC: network coding related messages -* @BATADV_DBG_MCAST: multicast related messages -* @BATADV_DBG_TP_METER: throughput meter messages -* @BATADV_DBG_ALL: the union of all the above log levels */ enum batadv_dbg_level { +/** @BATADV_DBG_BATMAN: OGM and TQ computations related messages */ BATADV_DBG_BATMAN =BIT (0 ), + +/** @BATADV_DBG_ROUTES: route added / changed / deleted */ BATADV_DBG_ROUTES =BIT (1 ), + +/** @BATADV_DBG_TT: translation table messages */ BATADV_DBG_TT =BIT (2 ), + +/** @BATADV_DBG_BLA: bridge loop avoidance messages */ BATADV_DBG_BLA =BIT (3 ), + +/** @BATADV_DBG_DAT: ARP snooping and DAT related messages */ BATADV_DBG_DAT =BIT (4 ), + +/** @BATADV_DBG_NC: network coding related messages */ BATADV_DBG_NC =BIT (5 ), + +/** @BATADV_DBG_MCAST: multicast related messages */ BATADV_DBG_MCAST =BIT (6 ), + +/** @BATADV_DBG_TP_METER: throughput meter messages */ BATADV_DBG_TP_METER =BIT (7 ), + +/** @BATADV_DBG_ALL: the union of all the above log levels */ BATADV_DBG_ALL =255 , };
net/batman-adv/multicast.h +11 -5
@@ -28,15 +28,21 @@ struct sk_buff;/** * enum batadv_forw_mode - the way a packet should be forwarded as -* @BATADV_FORW_ALL: forward the packet to all nodes (currently via classic -* flooding) -* @BATADV_FORW_SINGLE: forward the packet to a single node (currently via the -* BATMAN unicast routing protocol) -* @BATADV_FORW_NONE: don't forward, drop it */ enum batadv_forw_mode { +/** +* @BATADV_FORW_ALL: forward the packet to all nodes (currently via +* classic flooding) +*/ BATADV_FORW_ALL , + +/** +* @BATADV_FORW_SINGLE: forward the packet to a single node (currently +* via the BATMAN unicast routing protocol) +*/ BATADV_FORW_SINGLE , + +/** @BATADV_FORW_NONE: don't forward, drop it */ BATADV_FORW_NONE , };
net/batman-adv/types.h +1380 -609
2,844 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.11.0
Part of the diff is not shown here. View the raw message.
Simon Wunderlich
maintainerPATCH 16/20 batman-adv: Fix kernel-doc references to struct members
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
The correct syntax to create references in kernel-doc to a struct member is not "struct_name::member"" but "&struct_name->member" or "&struct_name.member". The correct syntax is required to get the correct cross-referencing in the reStructuredText text output.
--- net/batman-adv/types.h | 49 ++++++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 23 deletions(-)
net/batman-adv/types.h +26 -23
@@ -236,7 +236,7 @@ struct batadv_hard_iface {* struct batadv_orig_ifinfo - originator info per outgoing interface */ struct batadv_orig_ifinfo { -/** @list: list node for orig_node::ifinfo_list */ +/** @list: list node for &batadv_orig_node.ifinfo_list */ struct hlist_node list;/** @if_outgoing: pointer to outgoing hard-interface */
@@ -322,7 +322,7 @@ struct batadv_orig_node_vlan {/** @tt: VLAN specific TT attributes */ struct batadv_vlan_tt tt; -/** @list: list node for orig_node::vlan_list */ +/** @list: list node for &batadv_orig_node.vlan_list */ struct hlist_node list;/**
@@ -469,7 +469,7 @@ struct batadv_orig_node {*/ spinlock_t neigh_list_lock; -/** @hash_entry: hlist node for batadv_priv::orig_hash */ +/** @hash_entry: hlist node for &batadv_priv.orig_hash */ struct hlist_node hash_entry;/** @bat_priv: pointer to soft_iface this orig node belongs to */
@@ -541,7 +541,7 @@ enum batadv_orig_capabilities {* struct batadv_gw_node - structure for orig nodes announcing gw capabilities */ struct batadv_gw_node { -/** @list: list node for batadv_priv_gw::list */ +/** @list: list node for &batadv_priv_gw.list */ struct hlist_node list;/** @orig_node: pointer to corresponding orig node */
@@ -590,7 +590,7 @@ struct batadv_hardif_neigh_node_bat_v {* struct batadv_hardif_neigh_node - unique neighbor per hard-interface */ struct batadv_hardif_neigh_node { -/** @list: list node for batadv_hard_iface::neigh_list */ +/** @list: list node for &batadv_hard_iface.neigh_list */ struct hlist_node list;/** @addr: the MAC address of the neighboring interface */
@@ -623,7 +623,7 @@ struct batadv_hardif_neigh_node {* struct batadv_neigh_node - structure for single hops neighbors */ struct batadv_neigh_node { -/** @list: list node for batadv_orig_node::neigh_list */ +/** @list: list node for &batadv_orig_node.neigh_list */ struct hlist_node list;/** @orig_node: pointer to corresponding orig_node */
@@ -699,7 +699,7 @@ struct batadv_neigh_ifinfo_bat_v {* struct batadv_neigh_ifinfo - neighbor information per outgoing interface */ struct batadv_neigh_ifinfo { -/** @list: list node for batadv_neigh_node::ifinfo_list */ +/** @list: list node for &batadv_neigh_node.ifinfo_list */ struct hlist_node list;/** @if_outgoing: pointer to outgoing hard-interface */
@@ -1310,7 +1310,7 @@ struct batadv_tp_unacked {/** @len: length of the packet */ u16 len; -/** @list: list node for batadv_tp_vars::unacked_list */ +/** @list: list node for &batadv_tp_vars.unacked_list */ struct list_head list; };
@@ -1329,7 +1329,7 @@ enum batadv_tp_meter_role {* struct batadv_tp_vars - tp meter private variables per session */ struct batadv_tp_vars { -/** @list: list node for bat_priv::tp_list */ +/** @list: list node for &bat_priv.tp_list */ struct hlist_node list;/** @timer: timer for ack (receiver) and retry (sender) */
@@ -1461,7 +1461,7 @@ struct batadv_softif_vlan {/** @tt: TT private attributes (VLAN specific) */ struct batadv_vlan_tt tt; -/** @list: list node for bat_priv::softif_vlan_list */ +/** @list: list node for &bat_priv.softif_vlan_list */ struct hlist_node list;/**
@@ -1729,7 +1729,7 @@ struct batadv_socket_client {* struct batadv_socket_packet - layer2 icmp packet for socket client */ struct batadv_socket_packet { -/** @list: list node for batadv_socket_client::queue_list */ +/** @list: list node for &batadv_socket_client.queue_list */ struct list_head list;/** @icmp_len: size of the layer2 icmp packet */
@@ -1754,7 +1754,7 @@ struct batadv_bla_backbone_gw {/** @vid: vlan id this gateway was detected on */ unsigned short vid; -/** @hash_entry: hlist node for batadv_priv_bla::backbone_hash */ +/** @hash_entry: hlist node for &batadv_priv_bla.backbone_hash */ struct hlist_node hash_entry;/** @bat_priv: pointer to soft_iface this backbone gateway belongs to */
@@ -1812,7 +1812,7 @@ struct batadv_bla_claim {/** @lasttime: last time we heard of claim (locals only) */ unsigned long lasttime; -/** @hash_entry: hlist node for batadv_priv_bla::claim_hash */ +/** @hash_entry: hlist node for &batadv_priv_bla.claim_hash */ struct hlist_node hash_entry;/** @refcount: number of contexts the object is used */
@@ -1834,8 +1834,8 @@ struct batadv_tt_common_entry {unsigned short vid;/** -* @hash_entry: hlist node for batadv_priv_tt::local_hash or for -* batadv_priv_tt::global_hash +* @hash_entry: hlist node for &batadv_priv_tt.local_hash or for +* &batadv_priv_tt.global_hash */ struct hlist_node hash_entry;
@@ -1902,7 +1902,7 @@ struct batadv_tt_orig_list_entry {/** @flags: per orig entry TT sync flags */ u8 flags; -/** @list: list node for batadv_tt_global_entry::orig_list */ +/** @list: list node for &batadv_tt_global_entry.orig_list */ struct hlist_node list;/** @refcount: number of contexts the object is used */
@@ -1916,7 +1916,7 @@ struct batadv_tt_orig_list_entry {* struct batadv_tt_change_node - structure for tt changes occurred */ struct batadv_tt_change_node { -/** @list: list node for batadv_priv_tt::changes_list */ +/** @list: list node for &batadv_priv_tt.changes_list */ struct list_head list;/** @change: holds the actual translation table diff data */
@@ -1938,7 +1938,7 @@ struct batadv_tt_req_node {/** @refcount: number of contexts the object is used by */ struct kref refcount; -/** @list: list node for batadv_priv_tt::req_list */ +/** @list: list node for &batadv_priv_tt.req_list */ struct hlist_node list; };
@@ -1960,7 +1960,7 @@ struct batadv_tt_roam_node {*/ unsigned long first_time; -/** @list: list node for batadv_priv_tt::roam_list */ +/** @list: list node for &batadv_priv_tt.roam_list */ struct list_head list; };
@@ -2062,7 +2062,10 @@ struct batadv_skb_cb {* struct batadv_forw_packet - structure for bcast packets to be sent/forwarded */ struct batadv_forw_packet { -/** @list: list node for batadv_priv::forw_{bat,bcast}_list */ +/** +* @list: list node for &batadv_priv.forw.bcast_list and +* &batadv_priv.forw.bat_list +*/ struct hlist_node list;/** @cleanup_list: list node for purging functions */
@@ -2292,7 +2295,7 @@ struct batadv_dat_entry {*/ unsigned long last_update; -/** @hash_entry: hlist node for batadv_priv_dat::hash */ +/** @hash_entry: hlist node for &batadv_priv_dat.hash */ struct hlist_node hash_entry;/** @refcount: number of contexts the object is used */
@@ -2336,7 +2339,7 @@ struct batadv_dat_candidate {* struct batadv_tvlv_container - container for tvlv appended to OGMs */ struct batadv_tvlv_container { -/** @list: hlist node for batadv_priv_tvlv::container_list */ +/** @list: hlist node for &batadv_priv_tvlv.container_list */ struct hlist_node list;/** @tvlv_hdr: tvlv header information needed to construct the tvlv */
@@ -2350,7 +2353,7 @@ struct batadv_tvlv_container {* struct batadv_tvlv_handler - handler for specific tvlv type and version */ struct batadv_tvlv_handler { -/** @list: hlist node for batadv_priv_tvlv::handler_list */ +/** @list: hlist node for &batadv_priv_tvlv.handler_list */ struct hlist_node list;/**
Signature · 1 line
2.11.0
Simon Wunderlich
maintainerPATCH 17/20 batman-adv: Add kernel-doc to structs in headers
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
All structs in types.h are already documented. But some other headers still have private structs which also should be documented.
--- net/batman-adv/hash.h | 14 +++++++++++--- net/batman-adv/sysfs.h | 13 +++++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-)
net/batman-adv/hash.h +11 -3
@@ -48,10 +48,18 @@ typedef bool (*batadv_hashdata_compare_cb)(const struct hlist_node *,typedef u32 (*batadv_hashdata_choose_cb )(const void *,u32 );typedef void (*batadv_hashdata_free_cb )(struct hlist_node *,void *); +/** +* struct batadv_hashtable - Wrapper of simple hlist based hashtable +*/ struct batadv_hashtable { -struct hlist_head *table;/* the hashtable itself with the buckets */ -spinlock_t *list_locks;/* spinlock for each hash list entry */ -u32 size;/* size of hashtable */ +/** @table: the hashtable itself with the buckets */ +struct hlist_head *table; + +/** @list_locks: spinlock for each hash list entry */ +spinlock_t *list_locks; + +/** @size: size of hashtable */ +u32 size; };/* allocates and clears the hash */
net/batman-adv/sysfs.h +13 -0
@@ -38,10 +38,23 @@ struct net_device;*/ #define BATADV_SYSFS_VLAN_SUBDIR_PREFIX "vlan" +/** +* struct batadv_attribute - sysfs export helper for batman-adv attributes +*/ struct batadv_attribute { +/** @attr: sysfs attribute file */ struct attribute attr; + +/** +* @show: function to export the current attribute's content to sysfs +*/ ssize_t (*show)(struct kobject *kobj,struct attribute *attr,char *buf); + +/** +* @store: function to load new value from character buffer and save it +* in batman-adv attribute +*/ ssize_t (*store)(struct kobject *kobj,struct attribute *attr,char *buf,size_t count); };
Signature · 1 line
2.11.0
Simon Wunderlich
maintainerPATCH 18/20 batman-adv: Add kernel-doc to enums in headers
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
All enums in types.h are already documented. But some other headers still have private enums which also should be documented.
--- net/batman-adv/hard-interface.h | 23 +++++++++++++++++++++++ net/batman-adv/main.h | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+)
net/batman-adv/hard-interface.h +23 -0
@@ -33,12 +33,35 @@struct net_device ;struct net ; +/** +* enum batadv_hard_if_state - State of a hard interface +*/ enum batadv_hard_if_state { +/** +* @BATADV_IF_NOT_IN_USE: interface is not used as slave interface of a +* batman-adv soft interface +*/ BATADV_IF_NOT_IN_USE , + +/** +* @BATADV_IF_TO_BE_REMOVED: interface will be removed from soft +* interface +*/ BATADV_IF_TO_BE_REMOVED , + +/** @BATADV_IF_INACTIVE: interface is deactivated */ BATADV_IF_INACTIVE , + +/** @BATADV_IF_ACTIVE: interface is used */ BATADV_IF_ACTIVE , + +/** @BATADV_IF_TO_BE_ACTIVATED: interface is getting activated */ BATADV_IF_TO_BE_ACTIVATED , + +/** +* @BATADV_IF_I_WANT_YOU: interface is queued up (using sysfs) for being +* added as slave interface of a batman-adv soft interface +*/ BATADV_IF_I_WANT_YOU , };
net/batman-adv/main.h +32 -0
@@ -143,24 +143,56 @@*/ #define BATADV_TP_MAX_NUM 5 +/** +* enum batadv_mesh_state - State of a soft interface +*/ enum batadv_mesh_state { +/** @BATADV_MESH_INACTIVE: soft interface is not yet running */ BATADV_MESH_INACTIVE , + +/** @BATADV_MESH_ACTIVE: interface is up and running */ BATADV_MESH_ACTIVE , + +/** @BATADV_MESH_DEACTIVATING: interface is getting shut down */ BATADV_MESH_DEACTIVATING , };#define BATADV_BCAST_QUEUE_LEN 256#define BATADV_BATMAN_QUEUE_LEN 256 +/** +* enum batadv_uev_action - action type of uevent +*/ enum batadv_uev_action { +/** @BATADV_UEV_ADD: gateway was selected (after none was selected) */ BATADV_UEV_ADD =0 , + +/** +* @BATADV_UEV_DEL: selected gateway was removed and none is selected +* anymore +*/ BATADV_UEV_DEL , + +/** +* @BATADV_UEV_CHANGE: a different gateway was selected as based gateway +*/ BATADV_UEV_CHANGE , + +/** +* @BATADV_UEV_LOOPDETECT: loop was detected which cannot be handled by +* bridge loop avoidance +*/ BATADV_UEV_LOOPDETECT , }; +/** +* enum batadv_uev_type - Type of uevent +*/ enum batadv_uev_type { +/** @BATADV_UEV_GW: selected gateway was modified */ BATADV_UEV_GW =0 , + +/** @BATADV_UEV_BLA: bridge loop avoidance event */ BATADV_UEV_BLA , };
Signature · 1 line
2.11.0
Simon Wunderlich
maintainerPATCH 19/20 batman-adv: Add kernel-doc to functions in headers
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
Externally visible functions should be documented with kernel-doc. This usually refers to non-static functions but also static inline files in headers are visible in other files and should therefore be documented.
--- net/batman-adv/bitarray.h | 7 +++- net/batman-adv/hard-interface.h | 6 +++ net/batman-adv/hash.h | 11 +++++- net/batman-adv/log.h | 35 +++++++++++++++++- net/batman-adv/main.h | 82 ++++++++++++++++++++++++++++++++++------- net/batman-adv/originator.h | 9 ++++- 6 files changed, 131 insertions(+), 19 deletions(-)
net/batman-adv/bitarray.h +6 -1
@@ -49,7 +49,12 @@ static inline bool batadv_test_bit(const unsigned long *seq_bits,return test_bit (diff, seq_bits) !=0 ; } -/* turn corresponding bit on, so we can remember that we got the packet */ +/** +* batadv_set_bit() - Turn corresponding bit on, so we can remember that we got +* the packet +* @seq_bits: bitmap of the packet receive window +* @n: relative sequence number of newly received packet +*/ static inline void batadv_set_bit (unsigned long *seq_bits,s32 n) {/* if too old, just drop it */
net/batman-adv/hard-interface.h +6 -0
@@ -132,6 +132,12 @@ static inline void batadv_hardif_put(struct batadv_hard_iface *hard_iface)kref_put (&hard_iface->refcount, batadv_hardif_release); } +/** +* batadv_primary_if_get_selected() - Get reference to primary interface +* @bat_priv: the bat priv with all the soft interface information +* +* Return: primary interface (with increased refcnt), otherwise NULL +*/ static inline struct batadv_hard_iface *batadv_primary_if_get_selected (struct batadv_priv *bat_priv) {
net/batman-adv/hash.h +9 -2
@@ -123,8 +123,15 @@ static inline int batadv_hash_add(struct batadv_hashtable *hash,return ret; } -/* removes data from hash, if found. data could be the structure you use with -* just the key filled, we just need the key for comparing. +/** +* batadv_hash_remove() - Removes data from hash, if found +* @hash: hash table +* @compare: callback to determine if 2 hash elements are identical +* @choose: callback calculating the hash index +* @data: data passed to the aforementioned callbacks as argument +* +* ata could be the structure you use with just the key filled, we just need +* the key for comparing. * * Return: returns pointer do data on success, so you can remove the used * structure yourself, or NULL on error
net/batman-adv/log.h +34 -1
@@ -81,7 +81,14 @@ enum batadv_dbg_level { int batadv_debug_log(struct batadv_priv *bat_priv, const char *fmt, ...) __printf(2, 3); -/* possibly ratelimited debug output */ +/** +* _batadv_dbg() - Store debug output with(out) ratelimiting +* @type: type of debug message +* @bat_priv: the bat priv with all the soft interface information +* @ratelimited: whether output should be rate limited +* @fmt: format string +* @arg...: variable arguments +*/ #define _batadv_dbg(type, bat_priv, ratelimited, fmt, arg...) \ do { \ struct batadv_priv *__batpriv = (bat_priv); \
@@ -100,11 +107,30 @@ static inline void _batadv_dbg(int type __always_unused, }#endif +/** +* batadv_dbg() - Store debug output without ratelimiting +* @type: type of debug message +* @bat_priv: the bat priv with all the soft interface information +* @arg...: format string and variable arguments +*/ #define batadv_dbg(type, bat_priv, arg...) \ _batadv_dbg(type, bat_priv, 0, ## arg) + +/** +* batadv_dbg_ratelimited() - Store debug output with ratelimiting +* @type: type of debug message +* @bat_priv: the bat priv with all the soft interface information +* @arg...: format string and variable arguments +*/ #define batadv_dbg_ratelimited(type, bat_priv, arg...) \ _batadv_dbg(type, bat_priv, 1, ## arg) +/** +* batadv_info() - Store message in debug buffer and print it to kmsg buffer +* @net_dev: the soft interface net device +* @fmt: format string +* @arg...: variable arguments +*/ #define batadv_info(net_dev, fmt, arg...) \ do { \ struct net_device *_netdev = (net_dev); \
@@ -112,6 +138,13 @@ static inline void _batadv_dbg(int type __always_unused, batadv_dbg(BATADV_DBG_ALL, _batpriv, fmt, ## arg); \ pr_info("%s: " fmt, _netdev->name, ## arg); \ } while (0) + +/** +* batadv_err() - Store error in debug buffer and print it to kmsg buffer +* @net_dev: the soft interface net device +* @fmt: format string +* @arg...: variable arguments +*/ #define batadv_err(net_dev, fmt, arg...) \ do { \ struct net_device *_netdev = (net_dev); \
net/batman-adv/main.h +69 -13
109 lines not on this page · raw message
net/batman-adv/originator.h +7 -2
@@ -86,8 +86,13 @@ batadv_orig_node_vlan_get(struct batadv_orig_node *orig_node, unsigned short vid);void batadv_orig_node_vlan_put (struct batadv_orig_node_vlan *orig_vlan); -/* hashfunction to choose an entry in a hash table of given size -* hash algorithm from http://en.wikipedia.org/wiki/Hash_table +/** +* batadv_choose_orig() - Return the index of the orig entry in the hash table +* @data: mac address of the originator node +* @size: the size of the hash table +* +* Return: the hash index where the object represented by @data should be +* stored at. */ static inline u32 batadv_choose_orig (const void *data,u32 size) {
Signature · 1 line
2.11.0
Simon Wunderlich
maintainerPATCH 20/20 batman-adv: Add kernel-doc to externally visible functions
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
According to the kernel-doc documentation, externally visible functions should be documented. This refers to all all non-static function which can (and will) be used by functions in other sources files.
--- net/batman-adv/bat_algo.c | 27 ++++++++++++++++++++++++ net/batman-adv/bat_iv_ogm.c | 5 +++++ net/batman-adv/debugfs.c | 16 ++++++++++++++ net/batman-adv/gateway_client.c | 38 +++++++++++++++++++++++++++++++++ net/batman-adv/gateway_common.c | 9 ++++++++ net/batman-adv/hard-interface.c | 36 ++++++++++++++++++++++++++++++- net/batman-adv/hash.c | 17 +++++++++++++-- net/batman-adv/icmp_socket.c | 9 ++++++++ net/batman-adv/log.c | 17 +++++++++++++++ net/batman-adv/main.c | 31 +++++++++++++++++++++++++++ net/batman-adv/originator.c | 43 ++++++++++++++++++++++++++++++++++++++ net/batman-adv/routing.c | 29 +++++++++++++++++++++++++ net/batman-adv/send.c | 18 ++++++++++++++++ net/batman-adv/soft-interface.c | 20 ++++++++++++++++++ net/batman-adv/sysfs.c | 32 ++++++++++++++++++++++++++++ net/batman-adv/translation-table.c | 37 ++++++++++++++++++++++++++++++++ 16 files changed, 381 insertions(+), 3 deletions(-)
net/batman-adv/bat_algo.c +27 -0
@@ -63,6 +63,12 @@ static struct batadv_algo_ops *batadv_algo_get(char *name)return bat_algo_ops; } +/** +* batadv_algo_register() - Register callbacks for a mesh algorithm +* @bat_algo_ops: mesh algorithm callbacks to add +* +* Return: 0 on success or negative error number in case of failure +*/ int batadv_algo_register (struct batadv_algo_ops *bat_algo_ops) {struct batadv_algo_ops *bat_algo_ops_tmp;
@@ -92,6 +98,19 @@ int batadv_algo_register(struct batadv_algo_ops *bat_algo_ops)return 0 ; } +/** +* batadv_algo_select() - Select algorithm of soft interface +* @bat_priv: the bat priv with all the soft interface information +* @name: name of the algorithm to select +* +* The algorithm callbacks for the soft interface will be set when the algorithm +* with the correct name was found. Any previous selected algorithm will not be +* deinitialized and the new selected algorithm will also not be initialized. +* It is therefore not allowed to call batadv_algo_select outside the creation +* function of the soft interface. +* +* Return: 0 on success or negative error number in case of failure +*/ int batadv_algo_select (struct batadv_priv *bat_priv,char *name) {struct batadv_algo_ops *bat_algo_ops;
@@ -106,6 +125,14 @@ int batadv_algo_select(struct batadv_priv *bat_priv, char *name) }#ifdef CONFIG_BATMAN_ADV_DEBUGFS + +/** +* batadv_algo_seq_print_text() - Print the supported algorithms in a seq file +* @seq: seq file to print on +* @offset: not used +* +* Return: always 0 +*/ int batadv_algo_seq_print_text (struct seq_file *seq,void *offset) {struct batadv_algo_ops *bat_algo_ops;
net/batman-adv/bat_iv_ogm.c +5 -0
@@ -2855,6 +2855,11 @@ static struct batadv_algo_ops batadv_batman_iv __read_mostly = { }, }; +/** +* batadv_iv_init() - B.A.T.M.A.N. IV initialization function +* +* Return: 0 on success or negative error number in case of failure +*/ int __init batadv_iv_init (void ) {int ret;
net/batman-adv/debugfs.c +16 -0
@@ -261,6 +261,9 @@ static struct batadv_debuginfo *batadv_hardif_debuginfos[] = { NULL, }; +/** +* batadv_debugfs_init() - Initialize soft interface independent debugfs entries +*/ void batadv_debugfs_init (void ) {struct batadv_debuginfo **bat_debug;
@@ -291,6 +294,9 @@ void batadv_debugfs_init(void) batadv_debugfs =NULL ; } +/** +* batadv_debugfs_destroy() - Remove all debugfs entries +*/ void batadv_debugfs_destroy (void ) {debugfs_remove_recursive (batadv_debugfs);
@@ -357,6 +363,12 @@ void batadv_debugfs_del_hardif(struct batadv_hard_iface *hard_iface) } } +/** +* batadv_debugfs_add_meshif() - Initialize interface dependent debugfs entries +* @dev: netdev struct of the soft interface +* +* Return: 0 on success or negative error number in case of failure +*/ int batadv_debugfs_add_meshif (struct net_device *dev) {struct batadv_priv *bat_priv =netdev_priv (dev);
@@ -403,6 +415,10 @@ int batadv_debugfs_add_meshif(struct net_device *dev)return -ENOMEM ; } +/** +* batadv_debugfs_del_meshif() - Remove interface dependent debugfs entries +* @dev: netdev struct of the soft interface +*/ void batadv_debugfs_del_meshif (struct net_device *dev) {struct batadv_priv *bat_priv =netdev_priv (dev);
net/batman-adv/gateway_client.c +38 -0
@@ -95,6 +95,12 @@ void batadv_gw_node_put(struct batadv_gw_node *gw_node)kref_put (&gw_node->refcount, batadv_gw_node_release); } +/** +* batadv_gw_get_selected_gw_node() - Get currently selected gateway +* @bat_priv: the bat priv with all the soft interface information +* +* Return: selected gateway (with increased refcnt), NULL on errors +*/ struct batadv_gw_node *batadv_gw_get_selected_gw_node (struct batadv_priv *bat_priv) {
@@ -113,6 +119,12 @@ batadv_gw_get_selected_gw_node(struct batadv_priv *bat_priv)return gw_node; } +/** +* batadv_gw_get_selected_orig() - Get originator of currently selected gateway +* @bat_priv: the bat priv with all the soft interface information +* +* Return: orig_node of selected gateway (with increased refcnt), NULL on errors +*/ struct batadv_orig_node *batadv_gw_get_selected_orig (struct batadv_priv *bat_priv) {
@@ -206,6 +218,10 @@ void batadv_gw_check_client_stop(struct batadv_priv *bat_priv)batadv_gw_node_put (curr_gw); } +/** +* batadv_gw_election() - Elect the best gateway +* @bat_priv: the bat priv with all the soft interface information +*/ void batadv_gw_election (struct batadv_priv *bat_priv) {struct batadv_gw_node *curr_gw =NULL ;
@@ -294,6 +310,11 @@ void batadv_gw_election(struct batadv_priv *bat_priv)batadv_neigh_ifinfo_put (router_ifinfo); } +/** +* batadv_gw_check_election() - Elect orig node as best gateway when eligible +* @bat_priv: the bat priv with all the soft interface information +* @orig_node: orig node which is to be checked +*/ void batadv_gw_check_election (struct batadv_priv *bat_priv,struct batadv_orig_node *orig_node) {
@@ -462,6 +483,11 @@ void batadv_gw_node_update(struct batadv_priv *bat_priv,batadv_gw_node_put (gw_node); } +/** +* batadv_gw_node_delete() - Remove orig_node from gateway list +* @bat_priv: the bat priv with all the soft interface information +* @orig_node: orig node which is currently in process of being removed +*/ void batadv_gw_node_delete (struct batadv_priv *bat_priv,struct batadv_orig_node *orig_node) {
@@ -473,6 +499,10 @@ void batadv_gw_node_delete(struct batadv_priv *bat_priv,batadv_gw_node_update (bat_priv, orig_node, &gateway); } +/** +* batadv_gw_node_free() - Free gateway information from soft interface +* @bat_priv: the bat priv with all the soft interface information +*/ void batadv_gw_node_free (struct batadv_priv *bat_priv) {struct batadv_gw_node *gw_node;
@@ -488,6 +518,14 @@ void batadv_gw_node_free(struct batadv_priv *bat_priv) }#ifdef CONFIG_BATMAN_ADV_DEBUGFS + +/** +* batadv_gw_client_seq_print_text() - Print the gateway table in a seq file +* @seq: seq file to print on +* @offset: not used +* +* Return: always 0 +*/ int batadv_gw_client_seq_print_text (struct seq_file *seq,void *offset) {struct net_device *net_dev = (struct net_device *)seq->private;
net/batman-adv/gateway_common.c +9 -0
@@ -167,6 +167,15 @@ void batadv_gw_tvlv_container_update(struct batadv_priv *bat_priv) } } +/** +* batadv_gw_bandwidth_set() - Parse and set download/upload gateway bandwidth +* from supplied string buffer +* @net_dev: netdev struct of the soft interface +* @buff: the buffer containing the user data +* @count: number of bytes in the buffer +* +* Return: 'count' on success or a negative error code in case of failure +*/ ssize_t batadv_gw_bandwidth_set (struct net_device *net_dev,char *buff,size_t count) {
net/batman-adv/hard-interface.c +35 -1
@@ -69,6 +69,12 @@ void batadv_hardif_release(struct kref *ref)kfree_rcu (hard_iface, rcu); } +/** +* batadv_hardif_get_by_netdev() - Get hard interface object of a net_device +* @net_dev: net_device to search for +* +* Return: batadv_hard_iface of net_dev (with increased refcnt), NULL on errors +*/ struct batadv_hard_iface *batadv_hardif_get_by_netdev (const struct net_device *net_dev) {
@@ -563,6 +569,13 @@ static void batadv_hardif_recalc_extra_skbroom(struct net_device *soft_iface) soft_iface->needed_tailroom = lower_tailroom; } +/** +* batadv_hardif_min_mtu() - Calculate maximum MTU for soft interface +* @soft_iface: netdev struct of the soft interface +* +* Return: MTU for the soft-interface (limited by the minimal MTU of all active +* slave interfaces) +*/ int batadv_hardif_min_mtu (struct net_device *soft_iface) {struct batadv_priv *bat_priv =netdev_priv (soft_iface);
@@ -609,7 +622,11 @@ int batadv_hardif_min_mtu(struct net_device *soft_iface)return min_t (int, min_mtu -batadv_max_header_len (),ETH_DATA_LEN ); } -/* adjusts the MTU if a new interface with a smaller MTU appeared. */ +/** +* batadv_update_min_mtu() - Adjusts the MTU if a new interface with a smaller +* MTU appeared +* @soft_iface: netdev struct of the soft interface +*/ void batadv_update_min_mtu (struct net_device *soft_iface) { soft_iface->mtu =batadv_hardif_min_mtu (soft_iface);
@@ -694,6 +711,14 @@ static int batadv_master_del_slave(struct batadv_hard_iface *slave,return ret; } +/** +* batadv_hardif_enable_interface() - Enslave hard interface to soft interface +* @hard_iface: hard interface to add to soft interface +* @net: the applicable net namespace +* @iface_name: name of the soft interface +* +* Return: 0 on success or negative error number in case of failure +*/ int batadv_hardif_enable_interface (struct batadv_hard_iface *hard_iface,struct net *net,const char *iface_name) {
@@ -805,6 +830,12 @@ int batadv_hardif_enable_interface(struct batadv_hard_iface *hard_iface,return ret; } +/** +* batadv_hardif_disable_interface() - Remove hard interface from soft interface +* @hard_iface: hard interface to be removed +* @autodel: whether to delete soft interface when it doesn't contain any other +* slave interfaces +*/ void batadv_hardif_disable_interface (struct batadv_hard_iface *hard_iface,enum batadv_hard_if_cleanup autodel) {
@@ -939,6 +970,9 @@ static void batadv_hardif_remove_interface(struct batadv_hard_iface *hard_iface)batadv_hardif_put (hard_iface); } +/** +* batadv_hardif_remove_interfaces() - Remove all hard interfaces +*/ void batadv_hardif_remove_interfaces (void ) {struct batadv_hard_iface *hard_iface, *hard_iface_tmp;
net/batman-adv/hash.c +15 -2
@@ -36,7 +36,10 @@ static void batadv_hash_init(struct batadv_hashtable *hash) } } -/* free only the hashtable and the hash itself. */ +/** +* batadv_hash_destroy() - Free only the hashtable and the hash itself +* @hash: hash object to destroy +*/ void batadv_hash_destroy (struct batadv_hashtable *hash) {kfree (hash->list_locks);
@@ -44,7 +47,12 @@ void batadv_hash_destroy(struct batadv_hashtable *hash)kfree (hash); } -/* allocates and clears the hash */ +/** +* batadv_hash_new() - Allocates and clears the hashtable +* @size: number of hash buckets to allocate +* +* Return: newly allocated hashtable, NULL on errors +*/ struct batadv_hashtable *batadv_hash_new (u32 size) {struct batadv_hashtable *hash;
@@ -73,6 +81,11 @@ struct batadv_hashtable *batadv_hash_new(u32 size)return NULL ; } +/** +* batadv_hash_set_lock_class() - Set specific lockdep class for hash spinlocks +* @hash: hash object to modify +* @key: lockdep class key address +*/ void batadv_hash_set_lock_class (struct batadv_hashtable *hash,struct lock_class_key *key) {
net/batman-adv/icmp_socket.c +9 -0
@@ -59,6 +59,9 @@ static void batadv_socket_add_packet(struct batadv_socket_client *socket_client,struct batadv_icmp_header *icmph, size_t icmp_len); +/** +* batadv_socket_init() - Initialize soft interface independent socket data +*/ void batadv_socket_init (void ) {memset (batadv_socket_client_hash,0 ,sizeof (batadv_socket_client_hash));
@@ -318,6 +321,12 @@ static const struct file_operations batadv_fops = { .llseek = no_llseek, }; +/** +* batadv_socket_setup() - Create debugfs "socket" file +* @bat_priv: the bat priv with all the soft interface information +* +* Return: 0 on success or negative error number in case of failure +*/ int batadv_socket_setup (struct batadv_priv *bat_priv) {struct dentry *d;
net/batman-adv/log.c +17 -0
@@ -90,6 +90,13 @@ static int batadv_fdebug_log(struct batadv_priv_debug_log *debug_log,return 0 ; } +/** +* batadv_debug_log() - Add debug log entry +* @bat_priv: the bat priv with all the soft interface information +* @fmt: format string +* +* Return: 0 on success or negative error number in case of failure +*/ int batadv_debug_log (struct batadv_priv *bat_priv,const char *fmt, ...) {va_list args;
@@ -201,6 +208,12 @@ static const struct file_operations batadv_log_fops = { .llseek = no_llseek, }; +/** +* batadv_debug_log_setup() - Initialize debug log +* @bat_priv: the bat priv with all the soft interface information +* +* Return: 0 on success or negative error number in case of failure +*/ int batadv_debug_log_setup (struct batadv_priv *bat_priv) {struct dentry *d;
@@ -226,6 +239,10 @@ int batadv_debug_log_setup(struct batadv_priv *bat_priv)return -ENOMEM ; } +/** +* batadv_debug_log_cleanup() - Destroy debug log +* @bat_priv: the bat priv with all the soft interface information +*/ void batadv_debug_log_cleanup (struct batadv_priv *bat_priv) {kfree (bat_priv->debug_log);
net/batman-adv/main.c +31 -0
@@ -142,6 +142,12 @@ static void __exit batadv_exit(void)batadv_tt_cache_destroy (); } +/** +* batadv_mesh_init() - Initialize soft interface +* @soft_iface: netdev struct of the soft interface +* +* Return: 0 on success or negative error number in case of failure +*/ int batadv_mesh_init (struct net_device *soft_iface) {struct batadv_priv *bat_priv =netdev_priv (soft_iface);
@@ -219,6 +225,10 @@ int batadv_mesh_init(struct net_device *soft_iface)return ret; } +/** +* batadv_mesh_free() - Deinitialize soft interface +* @soft_iface: netdev struct of the soft interface +*/ void batadv_mesh_free (struct net_device *soft_iface) {struct batadv_priv *bat_priv =netdev_priv (soft_iface);
@@ -415,6 +425,16 @@ static int batadv_recv_unhandled_packet(struct sk_buff *skb,/* incoming packets with the batman ethertype received on any active hard * interface */ + +/** +* batadv_batman_skb_recv() - Handle incoming message from an hard interface +* @skb: the received packet +* @dev: the net device that the packet was received on +* @ptype: packet type of incoming packet (ETH_P_BATMAN) +* @orig_dev: the original receive net device (e.g. bonded device) +* +* Return: NET_RX_SUCCESS on success or NET_RX_DROP in case of failure +*/ int batadv_batman_skb_recv (struct sk_buff *skb,struct net_device *dev,struct packet_type *ptype,struct net_device *orig_dev)
@@ -538,6 +558,13 @@ static void batadv_recv_handler_init(void) batadv_rx_handler[BATADV_UNICAST_FRAG ] = batadv_recv_frag_packet; } +/** +* batadv_recv_handler_register() - Register handler for batman-adv packet type +* @packet_type: batadv_packettype which should be handled +* @recv_handler: receive handler for the packet type +* +* Return: 0 on success or negative error number in case of failure +*/ int batadv_recv_handler_register(u8 packet_type, int (*recv_handler)(struct sk_buff *,
@@ -555,6 +582,10 @@ batadv_recv_handler_register(u8 packet_type,return 0 ; } +/** +* batadv_recv_handler_unregister() - Unregister handler for packet type +* @packet_type: batadv_packettype which should no longer be handled +*/ void batadv_recv_handler_unregister (u8 packet_type) { batadv_rx_handler[packet_type] = batadv_recv_unhandled_packet;
net/batman-adv/originator.c +43 -0
85 lines not on this page · raw message
net/batman-adv/routing.c +29 -0
@@ -183,6 +183,14 @@ bool batadv_window_protected(struct batadv_priv *bat_priv, s32 seq_num_diff,return false; } +/** +* batadv_check_management_packet() - Check preconditions for management packets +* @skb: incoming packet buffer +* @hard_iface: incoming hard interface +* @header_len: minimal header length of packet type +* +* Return: true when management preconditions are met, false otherwise +*/ bool batadv_check_management_packet (struct sk_buff *skb,struct batadv_hard_iface *hard_iface,int header_len)
@@ -350,6 +358,13 @@ static int batadv_recv_icmp_ttl_exceeded(struct batadv_priv *bat_priv,return ret; } +/** +* batadv_recv_icmp_packet() - Process incoming icmp packet +* @skb: incoming packet buffer +* @recv_if: incoming hard interface +* +* Return: NET_RX_SUCCESS on success or NET_RX_DROP in case of failure +*/ int batadv_recv_icmp_packet (struct sk_buff *skb,struct batadv_hard_iface *recv_if) {
@@ -938,6 +953,13 @@ int batadv_recv_unhandled_unicast_packet(struct sk_buff *skb,return NET_RX_DROP ; } +/** +* batadv_recv_unicast_packet() - Process incoming unicast packet +* @skb: incoming packet buffer +* @recv_if: incoming hard interface +* +* Return: NET_RX_SUCCESS on success or NET_RX_DROP in case of failure +*/ int batadv_recv_unicast_packet (struct sk_buff *skb,struct batadv_hard_iface *recv_if) {
@@ -1158,6 +1180,13 @@ int batadv_recv_frag_packet(struct sk_buff *skb,return ret; } +/** +* batadv_recv_bcast_packet() - Process incoming broadcast packet +* @skb: incoming packet buffer +* @recv_if: incoming hard interface +* +* Return: NET_RX_SUCCESS on success or NET_RX_DROP in case of failure +*/ int batadv_recv_bcast_packet (struct sk_buff *skb,struct batadv_hard_iface *recv_if) {
net/batman-adv/send.c +18 -0
@@ -126,12 +126,30 @@ int batadv_send_skb_packet(struct sk_buff *skb,return NET_XMIT_DROP ; } +/** +* batadv_send_broadcast_skb() - Send broadcast packet via hard interface +* @skb: packet to be transmitted (with batadv header and no outer eth header) +* @hard_iface: outgoing interface +* +* Return: A negative errno code is returned on a failure. A success does not +* guarantee the frame will be transmitted as it may be dropped due +* to congestion or traffic shaping. +*/ 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); } +/** +* batadv_send_unicast_skb() - Send unicast packet to neighbor +* @skb: packet to be transmitted (with batadv header and no outer eth header) +* @neigh: neighbor which is used as next hop to destination +* +* Return: A negative errno code is returned on a failure. A success does not +* guarantee the frame will be transmitted as it may be dropped due +* to congestion or traffic shaping. +*/ int batadv_send_unicast_skb (struct sk_buff *skb,struct batadv_neigh_node *neigh) {
net/batman-adv/soft-interface.c +20 -0
@@ -67,6 +67,13 @@#include "sysfs.h" #include "translation-table.h" +/** +* batadv_skb_head_push() - Increase header size and move (push) head pointer +* @skb: packet buffer which should be modified +* @len: number of bytes to add +* +* Return: 0 on success or negative error number in case of failure +*/ int batadv_skb_head_push (struct sk_buff *skb,unsigned int len) {int result;
@@ -1066,6 +1073,13 @@ static void batadv_softif_init_early(struct net_device *dev) dev->ethtool_ops = &batadv_ethtool_ops; } +/** +* batadv_softif_create() - Create and register soft interface +* @net: the applicable net namespace +* @name: name of the new soft interface +* +* Return: newly allocated soft_interface, NULL on errors +*/ struct net_device *batadv_softif_create (struct net *net,const char *name) {struct net_device *soft_iface;
@@ -1143,6 +1157,12 @@ static void batadv_softif_destroy_netlink(struct net_device *soft_iface,unregister_netdevice_queue (soft_iface, head); } +/** +* batadv_softif_is_valid() - Check whether device is a batadv soft interface +* @net_dev: device which should be checked +* +* Return: true when net_dev is a batman-adv interface, false otherwise +*/ bool batadv_softif_is_valid (const struct net_device *net_dev) {if (net_dev->netdev_ops->ndo_start_xmit == batadv_interface_tx)
net/batman-adv/sysfs.c +32 -0
@@ -737,6 +737,12 @@ static struct batadv_attribute *batadv_vlan_attrs[] = { NULL, }; +/** +* batadv_sysfs_add_meshif() - Add soft interface specific sysfs entries +* @dev: netdev struct of the soft interface +* +* Return: 0 on success or negative error number in case of failure +*/ int batadv_sysfs_add_meshif (struct net_device *dev) {struct kobject *batif_kobject = &dev->dev.kobj;
@@ -777,6 +783,10 @@ int batadv_sysfs_add_meshif(struct net_device *dev)return -ENOMEM ; } +/** +* batadv_sysfs_del_meshif() - Remove soft interface specific sysfs entries +* @dev: netdev struct of the soft interface +*/ void batadv_sysfs_del_meshif (struct net_device *dev) {struct batadv_priv *bat_priv =netdev_priv (dev);
@@ -1134,6 +1144,13 @@ static struct batadv_attribute *batadv_batman_attrs[] = { NULL, }; +/** +* batadv_sysfs_add_hardif() - Add hard interface specific sysfs entries +* @hardif_obj: address where to store the pointer to new sysfs folder +* @dev: netdev struct of the hard interface +* +* Return: 0 on success or negative error number in case of failure +*/ int batadv_sysfs_add_hardif (struct kobject **hardif_obj,struct net_device *dev) {struct kobject *hardif_kobject = &dev->dev.kobj;
@@ -1168,6 +1185,11 @@ int batadv_sysfs_add_hardif(struct kobject **hardif_obj, struct net_device *dev)return -ENOMEM ; } +/** +* batadv_sysfs_del_hardif() - Remove hard interface specific sysfs entries +* @hardif_obj: address to the pointer to which stores batman-adv sysfs folder +* of the hard interface +*/ void batadv_sysfs_del_hardif (struct kobject **hardif_obj) {kobject_uevent (*hardif_obj,KOBJ_REMOVE );
@@ -1176,6 +1198,16 @@ void batadv_sysfs_del_hardif(struct kobject **hardif_obj) *hardif_obj =NULL ; } +/** +* batadv_throw_uevent() - Send an uevent with batman-adv specific env data +* @bat_priv: the bat priv with all the soft interface information +* @type: subsystem type of event. Stored in uevent's BATTYPE +* @action: action type of event. Stored in uevent's BATACTION +* @data: string with additional information to the event (ignored for +* BATADV_UEV_DEL). Stored in uevent's BATDATA +* +* Return: 0 on success or negative error number in case of failure +*/ int batadv_throw_uevent (struct batadv_priv *bat_priv,enum batadv_uev_type type,enum batadv_uev_action action,const char *data) {
net/batman-adv/translation-table.c +37 -0
@@ -1057,6 +1057,14 @@ static void batadv_tt_tvlv_container_update(struct batadv_priv *bat_priv) }#ifdef CONFIG_BATMAN_ADV_DEBUGFS + +/** +* batadv_tt_local_seq_print_text() - Print the local tt table in a seq file +* @seq: seq file to print on +* @offset: not used +* +* Return: always 0 +*/ int batadv_tt_local_seq_print_text (struct seq_file *seq,void *offset) {struct net_device *net_dev = (struct net_device *)seq->private;
@@ -1929,6 +1937,13 @@ batadv_tt_global_print_entry(struct batadv_priv *bat_priv, } } +/** +* batadv_tt_global_seq_print_text() - Print the global tt table in a seq file +* @seq: seq file to print on +* @offset: not used +* +* Return: always 0 +*/ int batadv_tt_global_seq_print_text (struct seq_file *seq,void *offset) {struct net_device *net_dev = (struct net_device *)seq->private;
@@ -3731,6 +3746,10 @@ static void batadv_tt_purge(struct work_struct *work) msecs_to_jiffies(BATADV_TT_WORK_PERIOD)); } +/** +* batadv_tt_free() - Free translation table of soft interface +* @bat_priv: the bat priv with all the soft interface information +*/ void batadv_tt_free (struct batadv_priv *bat_priv) {batadv_tvlv_container_unregister (bat_priv,BATADV_TVLV_TT ,1 );
@@ -3878,6 +3897,15 @@ void batadv_tt_local_commit_changes(struct batadv_priv *bat_priv)spin_unlock_bh (&bat_priv->tt.commit_lock); } +/** +* batadv_is_ap_isolated() - Check if packet from upper layer should be dropped +* @bat_priv: the bat priv with all the soft interface information +* @src: source mac address of packet +* @dst: destination mac address of packet +* @vid: vlan id of packet +* +* Return: true when src+dst(+vid) pair should be isolated, false otherwise +*/ bool batadv_is_ap_isolated (struct batadv_priv *bat_priv,u8 *src,u8 *dst,unsigned short vid) {
@@ -4049,6 +4077,15 @@ bool batadv_tt_local_client_is_roaming(struct batadv_priv *bat_priv,return ret; } +/** +* batadv_tt_add_temporary_global_entry() - Add temporary entry to global TT +* @bat_priv: the bat priv with all the soft interface information +* @orig_node: orig node which the temporary entry should be associated with +* @addr: mac address of the client +* @vid: VLAN id of the new temporary global translation table +* +* Return: true when temporary tt entry could be added, false otherwise +*/ bool batadv_tt_add_temporary_global_entry(struct batadv_priv *bat_priv, struct batadv_orig_node *orig_node, const unsigned char *addr,
Signature · 1 line
2.11.0