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: Simon Wunderlich <simon@open-mesh.com>
Subject: Re: [B.A.T.M.A.N.] [PATCHv2] batman-adv: forward late OGMs from best next hop
Date: Thu, 23 May 2013 13:17:48 +0200	[thread overview]
Message-ID: <20130523111748.GF1679@ritirata.org> (raw)
In-Reply-To: <1369307262-21901-1-git-send-email-siwu@hrz.tu-chemnitz.de>

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

On Thu, May 23, 2013 at 01:07:42PM +0200, Simon Wunderlich wrote:
> ---
> Changes to PATCHv1:
>  * use enum to distinguish different duplicate states
>  * fix typo "is_simlar -> is_similar"
>  * remove antonios sign off (the patch changed, feel free to add it if
>    he is ok with it, it was his idea originally ...)

no, it's ok as it is :)

> ---
>  bat_iv_ogm.c |   86 +++++++++++++++++++++++++++++++++++++---------------------
>  1 file changed, 55 insertions(+), 31 deletions(-)
> 
> diff --git a/bat_iv_ogm.c b/bat_iv_ogm.c
> index 8d87f87..2b94fdd 100644
> --- a/bat_iv_ogm.c
> +++ b/bat_iv_ogm.c
> @@ -701,6 +701,21 @@ static void batadv_iv_ogm_schedule(struct batadv_hard_iface *hard_iface)
>  		batadv_hardif_free_ref(primary_if);
>  }
>  
> +/**
> + * batadv_dup_status - duplicate status
> + * @BATADV_NO_DUP: the packet is a 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 = 0,
> +	BATADV_ORIG_DUP,
> +	BATADV_NEIGH_DUP,
> +	BATADV_PROTECTED,
> +};
> +

Very nice! splitting the "simple boolean" into an enum is a very good idea imho.

> -/* processes a batman packet for all interfaces, adjusts the sequence number and
> - * finds out whether it is a duplicate.
> +/**
> + * batadv_iv_ogm_update_seqnos -  processes a batman packet for all interfaces,
> + *  adjusts the sequence number and finds out whether it is a duplicate.
> + * @ethhdr: Ethernet header of the packet
> + * @batadv_ogm_packet: OGM packet to be considered
> + * @if_incoming: interface where the OGM packet was received

A blank line is needed here. Maybe who's going to merge this patch can add it?
:)

> + * Returns: duplicate status as enum batadv_dup_status
>   * returns:
> - *   1 the packet is a duplicate
> - *   0 the packet has not yet been received
> - *  -1 the packet is old and has been received while the seqno window
> - *     was protected. Caller should drop it.
> - */
> -static int
> +  */
> +enum batadv_dup_status
>  batadv_iv_ogm_update_seqnos(const struct ethhdr *ethhdr,
>  			    const struct batadv_ogm_packet *batadv_ogm_packet,
>  			    const struct batadv_hard_iface *if_incoming)


The rest looks good! Thanks Simon.

Cheers,

-- 
Antonio Quartulli

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

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

  reply	other threads:[~2013-05-23 11:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-23 11:07 [B.A.T.M.A.N.] [PATCHv2] batman-adv: forward late OGMs from best next hop Simon Wunderlich
2013-05-23 11:17 ` Antonio Quartulli [this message]
2013-05-25 21:07 ` Linus Lüssing
2013-05-25 21:42   ` Antonio Quartulli
2013-05-26 15:14     ` Simon Wunderlich
2013-05-26 20:23       ` Antonio Quartulli
2013-06-09  4:30 ` Marek Lindner

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=20130523111748.GF1679@ritirata.org \
    --to=ordex@autistici.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=simon@open-mesh.com \
    /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