public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Marek Lindner <mareklindner@neomailbox.ch>
To: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@lists.open-mesh.org>
Subject: Re: [B.A.T.M.A.N.] [PATCH v2 4/5] batman-adv: make GW election code protocol specific
Date: Fri, 13 May 2016 19:07:52 +0800	[thread overview]
Message-ID: <2870286.TlxMuhjIas@voltaire> (raw)
In-Reply-To: <1462874769-5077-4-git-send-email-a@unstable.cc>

[-- Attachment #1: Type: text/plain, Size: 1603 bytes --]

On Tuesday, May 10, 2016 18:06:08 Antonio Quartulli wrote:
> +static struct batadv_gw_node *
> +batadv_iv_gw_get_best_gw_node(struct batadv_priv *bat_priv)

> +static bool batadv_iv_gw_is_eligible(struct batadv_priv *bat_priv,
> +				     struct batadv_orig_node *curr_gw_orig,
> +				     struct batadv_orig_node *orig_node)

> +/* fails if orig_node has no router */
> +static int batadv_iv_gw_write_buffer_text(struct batadv_priv *bat_priv,
> +					  struct seq_file *seq,
> +					  const struct batadv_gw_node *gw_node)

> +static void batadv_iv_gw_print(struct batadv_priv *bat_priv,
> +			       struct seq_file *seq)

How about some kernel doc ?  :)


> +211,7 @@ void batadv_gw_election(struct batadv_priv *bat_priv) if
> (!batadv_atomic_dec_not_zero(&bat_priv->gw.reselect) && curr_gw) goto out;
> 
> -	next_gw = batadv_gw_get_best_gw_node(bat_priv);
> +	next_gw = bat_priv->algo_ops->gw.get_best_gw_node(bat_priv);

Either make the gw.get_best_gw_node() ops mandatory or check for its existence 
before using it.


> @@ -1320,11 +1320,21 @@ struct batadv_algo_orig_ops {
> 
>   * struct batadv_algo_gw_ops - mesh algorithm callbacks (GW specific)
>   * @store_sel_class: parse and stores a new GW selection class
>   * @show_sel_class: prints the current GW selection class
> 
> + * @get_best_gw_node: select the best GW from the list of available nodes
> + * @is_eligible: check if a newly discovered GW is a potential candidate
> for
> + *  the election as best GW
> + * @print: print the gateway table (optional)
> 
>   */

Shall we mark all optional ops as optional or .. ?

Cheers,
Marek

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2016-05-13 11:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-10 10:06 [B.A.T.M.A.N.] [PATCH v2 1/5] batman-adv: make the GW selection class algorithm specific Antonio Quartulli
2016-05-10 10:06 ` [B.A.T.M.A.N.] [PATCH v2 2/5] batman-adv: split routing API data structure in subobjects Antonio Quartulli
2016-05-10 10:06 ` [B.A.T.M.A.N.] [PATCH v2 3/5] batman-adv: statically print gateway table header Antonio Quartulli
2016-05-10 10:06 ` [B.A.T.M.A.N.] [PATCH v2 4/5] batman-adv: make GW election code protocol specific Antonio Quartulli
2016-05-13 11:07   ` Marek Lindner [this message]
2016-05-13 13:23     ` Antonio Quartulli
2016-05-10 10:06 ` [B.A.T.M.A.N.] [PATCH v2 5/5] batman-adv: B.A.T.M.A.N. V - implement GW selection logic Antonio Quartulli
2016-05-13 11:31   ` Marek Lindner
2016-05-13 13:26     ` Antonio Quartulli
2016-05-13 10:44 ` [B.A.T.M.A.N.] [PATCH v2 1/5] batman-adv: make the GW selection class algorithm specific Marek Lindner
2016-05-13 13:21   ` Antonio Quartulli
  -- strict thread matches above, loose matches on Subject: below --
2016-05-23  9:00 [B.A.T.M.A.N.] [PATCH v2 0/5] GW code: make it algorithm-agnostic and add B.A.T.M.A.N. V Antonio Quartulli
2016-05-23  9:00 ` [B.A.T.M.A.N.] [PATCH v2 4/5] batman-adv: make GW election code protocol specific Antonio Quartulli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2870286.TlxMuhjIas@voltaire \
    --to=mareklindner@neomailbox.ch \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox