public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Antonio Quartulli <ordex@autistici.org>
To: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@lists.open-mesh.org>
Cc: "Martin Hundebøll" <martin@hundeboll.net>
Subject: Re: [B.A.T.M.A.N.] [RFC 2/6] batman-adv: Detect coding nodes and remove these after timeout
Date: Mon, 26 Nov 2012 01:41:17 +0100	[thread overview]
Message-ID: <20121126004117.GI14547@ritirata.org> (raw)
In-Reply-To: <e0944b8b9fcc9f288f11789a5f7f499b266caa2a.1353331252.git.martin@hundeboll.net>

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

On Mon, Nov 19, 2012 at 02:22:00PM +0100, Martin Hundebøll wrote:
[...]

> diff --git a/network-coding.c b/network-coding.c
> index 8d930e7..29f7744 100644
> --- a/network-coding.c
> +++ b/network-coding.c
> @@ -17,8 +17,12 @@
>   * 02110-1301, USA
>   */
>  
> +#include <linux/debugfs.h>
> +

Ok, I don't want to make you feel a cavy :) but it is better to correct this
stuff when we can: kernel-includes (<..h>) should follow project-includes
("..h")

>  #include "main.h"
>  #include "network-coding.h"
> +#include "originator.h"
> +#include "hard-interface.h"
>  
>  /**
> @@ -68,11 +218,197 @@ static void batadv_nc_worker(struct work_struct *work)
>  	priv_nc = container_of(delayed_work, struct batadv_priv_nc, work);
>  	bat_priv = container_of(priv_nc, struct batadv_priv, nc);
>  
> +	batadv_nc_purge_orig_hash(bat_priv);
> +

ah, now this function makes sense (with respect to what I said in reply to 1/6).
Would it be better to add the worker here instead of adding it in 1/6?

>  	/* Schedule a new check */
>  	batadv_nc_start_timer(bat_priv);
>  }

[...]
> @@ -268,9 +274,12 @@ struct batadv_priv_dat {
>  /**
>   * struct batadv_priv_nc - per mesh interface network coding private data
>   * @work: work queue callback item for cleanup
> + * @min_tq: only consider neighbors for encoding if neigh_tq > min_tq
>   */
>  struct batadv_priv_nc {
>  	struct delayed_work work;
> +	struct dentry *debug_dir;
> +	u8 min_tq;

If I am not mistaken min_tq is never modified. Why do we need to store it in a
bat_priv field? And being a constant is it worth a define? In this way it an be
easily found and tuned like the other constant params.

Cheers,

-- 
Antonio Quartulli

..each of us alone is worth nothing..
Ernesto "Che" Guevara

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2012-11-26  0:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-19 13:21 [B.A.T.M.A.N.] [RFC 0/6] CATWOMAN: Network coding in batman-adv Martin Hundebøll
2012-11-19 13:21 ` [B.A.T.M.A.N.] [RFC 1/6] batman-adv: Add the initial code for network coding Martin Hundebøll
2012-11-26  0:23   ` Antonio Quartulli
2012-11-27  8:24     ` Martin Hundebøll
2012-11-19 13:22 ` [B.A.T.M.A.N.] [RFC 2/6] batman-adv: Detect coding nodes and remove these after timeout Martin Hundebøll
2012-11-26  0:41   ` Antonio Quartulli [this message]
2012-11-26  1:15     ` Marek Lindner
2012-11-26  9:34       ` Antonio Quartulli
2012-11-19 13:22 ` [B.A.T.M.A.N.] [RFC 3/6] batman-adv: Buffer unicast packets before forward Martin Hundebøll
2012-11-19 13:22 ` [B.A.T.M.A.N.] [RFC 4/6] batman-adv: Code and transmit packets if possible Martin Hundebøll
2012-11-19 13:22 ` [B.A.T.M.A.N.] [RFC 5/6] batman-adv: Save overheard and tx packets for decoding Martin Hundebøll
2012-11-19 13:22 ` [B.A.T.M.A.N.] [RFC 6/6] batman-adv: Receive coded packets and decode them Martin Hundebøll

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=20121126004117.GI14547@ritirata.org \
    --to=ordex@autistici.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=martin@hundeboll.net \
    /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