From patchwork Tue Jun 7 20:44:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 16336 X-Patchwork-Delegate: mareklindner@neomailbox.ch Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id 6BE0E81C9F; Tue, 7 Jun 2016 22:44:59 +0200 (CEST) Authentication-Results: open-mesh.org; dmarc=none header.from=narfation.org Authentication-Results: open-mesh.org; dkim=fail reason="verification failed; unprotected key" header.d=narfation.org header.i=@narfation.org header.b=VpLaOoEz; dkim-adsp=fail (unprotected policy); dkim-atps=neutral Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=79.140.41.39; helo=v3-1039.vlinux.de; envelope-from=sven@narfation.org; receiver=b.a.t.m.a.n@lists.open-mesh.org Authentication-Results: open-mesh.org; dmarc=pass header.from=narfation.org Received: from v3-1039.vlinux.de (narfation.org [79.140.41.39]) by open-mesh.org (Postfix) with ESMTPS id 1811E81C9D for ; Tue, 7 Jun 2016 22:44:57 +0200 (CEST) Received: from sven-desktop.home.narfation.org (p200300C593C0D0FD6A1729FFFEE0E6EC.dip0.t-ipconnect.de [IPv6:2003:c5:93c0:d0fd:6a17:29ff:fee0:e6ec]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id 639DC1100E8; Tue, 7 Jun 2016 22:44:57 +0200 (CEST) Authentication-Results: v3-1039.vlinux.de; dmarc=none header.from=narfation.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=narfation.org; s=20121; t=1465332297; bh=mAijXzjcvM82OjJSEiEm+MVoT9j2EsDXjbkauH+ub3M=; h=From:To:Cc:Subject:Date:From; b=VpLaOoEzyVSttTFdpGBEMNF9tmU9T4mHmkt75O3RPwoSnEFdxrByt8yLHbXegMR29 SCxR1f5qBQzaWFbRMZeqRrGzdO1bVVBfcinlXdQn0V3LfuG+rGPtLzUv4AKdrwFyxq ljiOTNaCPfy3NHBDBsmqGiAf3yJwiQzaaxapZeyE= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Tue, 7 Jun 2016 22:44:53 +0200 Message-Id: <1465332293-6218-1-git-send-email-sven@narfation.org> X-Mailer: git-send-email 2.8.1 Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: Document optional batadv_algo_ops X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" Some operations in batadv_algo_ops are optional and marked as such in the kerneldoc. But some of them miss the "(optional)" in their kerneldoc. These have to also be marked to give an implementor of an algorithm the correct background information without looking in the code calling these function pointers. Signed-off-by: Sven Eckelmann --- net/batman-adv/types.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h index 43db7b6..0eeb68f 100644 --- a/net/batman-adv/types.h +++ b/net/batman-adv/types.h @@ -1392,6 +1392,7 @@ struct batadv_forw_packet { /** * struct batadv_algo_iface_ops - mesh algorithm callbacks (interface specific) * @activate: start routing mechanisms when hard-interface is brought up + * (optional) * @enable: init routing info when hard-interface is enabled * @disable: de-init routing info when hard-interface is disabled * @update_mac: (re-)init mac addresses of the protocol information @@ -1409,6 +1410,7 @@ struct batadv_algo_iface_ops { /** * struct batadv_algo_neigh_ops - mesh algorithm callbacks (neighbour specific) * @hardif_init: called on creation of single hop entry + * (optional) * @cmp: compare the metrics of two neighbors for their respective outgoing * interfaces * @is_similar_or_better: check if neigh1 is equally similar or better than @@ -1431,11 +1433,11 @@ struct batadv_algo_neigh_ops { /** * struct batadv_algo_orig_ops - mesh algorithm callbacks (originator specific) * @free: free the resources allocated by the routing algorithm for an orig_node - * object + * object (optional) * @add_if: ask the routing algorithm to apply the needed changes to the - * orig_node due to a new hard-interface being added into the mesh + * orig_node due to a new hard-interface being added into the mesh (optional) * @del_if: ask the routing algorithm to apply the needed changes to the - * orig_node due to an hard-interface being removed from the mesh + * orig_node due to an hard-interface being removed from the mesh (optional) * @print: print the originator table (optional) */ struct batadv_algo_orig_ops {