batman-adv: kernel-doc enhancements
Sven Eckelmann
maintainercover batman-adv: kernel-doc enhancements
Hi,
more and more functions/struct/enums/... in batman-adv have at least some brief documentation. But there were still some externally visible (as "visible" in other source files) elements which completely missed any kind of kernel-doc. Accoring to the kernel-doc dicumentation [1], having these documented "properly" is currently a goal.
This patchset now tries to unify the formatting slightly and then add more (brief) documentation to these elements.
Kind regards,
Sven
[1] https://www.kernel.org/doc/html/v4.14/doc-guide/kernel-doc.html#recommendations
Sven Eckelmann (8):
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
net/batman-adv/bat_algo.c | 34 +- net/batman-adv/bat_iv_ogm.c | 102 +- 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 | 9 +- net/batman-adv/bridge_loop_avoidance.c | 109 +- net/batman-adv/bridge_loop_avoidance.h | 4 +- net/batman-adv/debugfs.c | 28 +- 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 | 62 +- net/batman-adv/gateway_common.c | 27 +- net/batman-adv/gateway_common.h | 5 +- net/batman-adv/hard-interface.c | 62 +- net/batman-adv/hard-interface.h | 58 +- net/batman-adv/hash.c | 17 +- net/batman-adv/hash.h | 27 +- net/batman-adv/icmp_socket.c | 13 +- net/batman-adv/log.c | 17 + net/batman-adv/log.h | 61 +- net/batman-adv/main.c | 47 +- net/batman-adv/main.h | 120 +- net/batman-adv/multicast.c | 78 +- net/batman-adv/multicast.h | 16 +- net/batman-adv/netlink.c | 22 +- net/batman-adv/network-coding.c | 120 +- net/batman-adv/originator.c | 119 +- net/batman-adv/originator.h | 9 +- net/batman-adv/packet.h | 25 +- net/batman-adv/routing.c | 53 +- net/batman-adv/send.c | 63 +- net/batman-adv/send.h | 4 +- net/batman-adv/soft-interface.c | 61 +- net/batman-adv/sysfs.c | 52 +- net/batman-adv/sysfs.h | 13 + net/batman-adv/tp_meter.c | 70 +- net/batman-adv/translation-table.c | 226 ++-- net/batman-adv/tvlv.c | 38 +- net/batman-adv/types.h | 1992 ++++++++++++++++++++++---------- 43 files changed, 2694 insertions(+), 1282 deletions(-)
Signature · 1 line
2.11.0
Sven Eckelmann
maintainerPATCH 1/8 batman-adv: Add missing kernel-doc to packet.h
--- net/batman-adv/packet.h | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-)
net/batman-adv/packet.h +23 -2
@@ -21,6 +21,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)/**
@@ -88,7 +94,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 ,
@@ -136,7 +150,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
Sven Eckelmann
maintainerPATCH 2/8 batman-adv: Use parentheses in function kernel-doc
In reply to Sven EckelmannThe 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
@@ -37,7 +37,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 ) {
@@ -148,7 +149,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
@@ -179,7 +180,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
@@ -52,7 +52,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)
@@ -67,7 +67,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
@@ -153,8 +153,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)
@@ -177,7 +177,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
@@ -240,7 +240,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.
@@ -327,7 +327,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.
@@ -375,7 +375,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)
@@ -387,7 +387,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
@@ -408,7 +408,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 */
@@ -428,7 +428,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
@@ -488,7 +488,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
@@ -51,7 +51,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 *
@@ -88,7 +88,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)
@@ -107,7 +107,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 */
@@ -127,7 +127,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)
@@ -235,7 +235,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.
@@ -252,7 +252,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)
@@ -268,8 +268,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
@@ -314,7 +314,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
@@ -405,7 +405,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
@@ -490,7 +490,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
@@ -590,7 +590,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
@@ -639,7 +639,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
@@ -659,7 +659,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
@@ -787,7 +787,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 *
@@ -851,7 +851,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
@@ -884,7 +884,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
@@ -32,7 +32,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
@@ -26,7 +26,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
@@ -30,8 +30,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
@@ -66,8 +66,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 *
@@ -117,7 +117,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 *
@@ -154,7 +154,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 *
@@ -296,7 +296,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. *
@@ -338,7 +338,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
@@ -48,7 +48,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
@@ -61,7 +61,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 */
@@ -82,7 +82,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
@@ -41,7 +41,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 *
@@ -65,7 +65,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 */
@@ -89,7 +89,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. */
@@ -104,7 +104,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 *
@@ -134,7 +134,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
@@ -248,7 +248,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
@@ -306,7 +306,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 *
@@ -346,7 +346,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
@@ -400,7 +400,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
@@ -438,7 +438,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
@@ -39,7 +39,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
@@ -68,8 +68,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)
@@ -83,7 +83,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)
@@ -155,7 +156,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.
@@ -171,7 +172,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
@@ -321,7 +322,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
@@ -364,7 +365,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 *
@@ -393,7 +394,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
@@ -514,7 +515,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 *
@@ -567,7 +568,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
@@ -686,7 +687,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
@@ -33,8 +33,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
@@ -100,8 +100,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
@@ -136,8 +136,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)
@@ -207,7 +207,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)
@@ -248,7 +248,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)
@@ -264,7 +264,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
@@ -52,7 +52,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 */
@@ -86,7 +86,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 *
@@ -105,7 +105,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
@@ -138,7 +138,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
@@ -202,7 +202,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 *
@@ -246,7 +246,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 *
@@ -265,7 +265,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 *
@@ -289,7 +289,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 *
@@ -309,7 +309,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
@@ -344,7 +344,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 *
@@ -362,7 +362,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.
@@ -376,7 +376,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
@@ -667,7 +667,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
@@ -82,7 +82,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
@@ -62,7 +62,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
@@ -333,7 +333,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
@@ -390,7 +390,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
@@ -255,8 +255,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 *
@@ -286,7 +286,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 *
@@ -323,7 +323,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.
@@ -348,7 +348,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 *
@@ -558,7 +558,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
@@ -591,7 +591,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 *
@@ -618,7 +618,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
@@ -202,7 +202,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
@@ -238,7 +238,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 *
@@ -252,7 +252,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
@@ -99,7 +99,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 *
@@ -114,7 +114,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
@@ -169,7 +169,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
@@ -230,7 +230,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 *
@@ -246,7 +246,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
@@ -309,7 +309,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 *
@@ -386,7 +386,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 *
@@ -431,7 +431,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
@@ -473,7 +473,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 *
@@ -620,7 +620,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 ) {
@@ -632,7 +632,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.
Sven Eckelmann
maintainerPATCH 3/8 batman-adv: Use inline kernel-doc for enum/struct
In reply to Sven EckelmannThe 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
@@ -72,16 +72,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
@@ -32,11 +32,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
@@ -41,25 +41,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
@@ -44,25 +44,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
@@ -25,15 +25,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.
Sven Eckelmann
maintainerPATCH 4/8 batman-adv: Fix kernel-doc references to struct members
In reply to Sven EckelmannThe 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
@@ -233,7 +233,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 */
@@ -319,7 +319,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;/**
@@ -466,7 +466,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 */
@@ -538,7 +538,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 */
@@ -587,7 +587,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 */
@@ -620,7 +620,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 */
@@ -696,7 +696,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 */
@@ -1307,7 +1307,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; };
@@ -1326,7 +1326,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) */
@@ -1458,7 +1458,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;/**
@@ -1726,7 +1726,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 */
@@ -1751,7 +1751,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 */
@@ -1809,7 +1809,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 */
@@ -1831,8 +1831,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;
@@ -1899,7 +1899,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 */
@@ -1913,7 +1913,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 */
@@ -1935,7 +1935,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; };
@@ -1957,7 +1957,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; };
@@ -2059,7 +2059,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 */
@@ -2289,7 +2292,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 */
@@ -2333,7 +2336,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 */
@@ -2347,7 +2350,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
Sven Eckelmann
maintainerPATCH 5/8 batman-adv: Add kernel-doc to structs in headers
In reply to Sven EckelmannAll 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
@@ -45,10 +45,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
@@ -35,10 +35,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
Sven Eckelmann
maintainerPATCH 6/8 batman-adv: Add kernel-doc to enums in headers
In reply to Sven EckelmannAll 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
@@ -30,12 +30,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
@@ -140,24 +140,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
Sven Eckelmann
maintainerPATCH 7/8 batman-adv: Add kernel-doc to functions in headers
In reply to Sven EckelmannExternally 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
@@ -46,7 +46,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
@@ -129,6 +129,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
@@ -120,8 +120,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
@@ -78,7 +78,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); \
@@ -97,11 +104,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); \
@@ -109,6 +135,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
@@ -83,8 +83,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
Sven Eckelmann
maintainerPATCH 8/8 batman-adv: Add kernel-doc to externally visible functions
In reply to Sven EckelmannAccording 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
@@ -60,6 +60,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;
@@ -89,6 +95,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;
@@ -103,6 +122,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
@@ -2852,6 +2852,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
@@ -259,6 +259,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;
@@ -289,6 +292,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);
@@ -355,6 +361,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);
@@ -401,6 +413,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
@@ -92,6 +92,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) {
@@ -110,6 +116,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) {
@@ -203,6 +215,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 ;
@@ -291,6 +307,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) {
@@ -459,6 +480,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) {
@@ -470,6 +496,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;
@@ -485,6 +515,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
@@ -164,6 +164,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
@@ -66,6 +66,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) {
@@ -560,6 +566,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);
@@ -606,7 +619,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);
@@ -691,6 +708,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) {
@@ -802,6 +827,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) {
@@ -936,6 +967,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
@@ -33,7 +33,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);
@@ -41,7 +44,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;
@@ -70,6 +78,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
@@ -55,6 +55,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));
@@ -314,6 +317,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
@@ -86,6 +86,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;
@@ -197,6 +204,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;
@@ -222,6 +235,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
@@ -139,6 +139,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);
@@ -216,6 +222,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);
@@ -412,6 +422,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)
@@ -535,6 +555,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 *,
@@ -552,6 +579,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
@@ -180,6 +180,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)
@@ -347,6 +355,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) {
@@ -935,6 +950,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) {
@@ -1155,6 +1177,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
@@ -123,12 +123,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
@@ -64,6 +64,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;
@@ -1063,6 +1070,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;
@@ -1140,6 +1154,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
@@ -733,6 +733,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;
@@ -773,6 +779,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);
@@ -1130,6 +1140,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;
@@ -1164,6 +1181,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 );
@@ -1172,6 +1194,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
@@ -1053,6 +1053,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;
@@ -1925,6 +1933,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;
@@ -3727,6 +3742,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 );
@@ -3874,6 +3893,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) {
@@ -4045,6 +4073,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
Quoted 10 lines · On Samstag, 2. Dezember 2017 19:51:45 CET Sven Eckelmann wrote:
Hi,
more and more functions/struct/enums/... in batman-adv have at least some brief documentation. But there were still some externally visible (as "visible" in other source files) elements which completely missed any kind of kernel-doc. Accoring to the kernel-doc dicumentation [1], having these documented "properly" is currently a goal.
This patchset now tries to unify the formatting slightly and then add more (brief) documentation to these elements.
Applied in cfcb3be43ef5..10e3e73a191b
Kind regards,
Sven