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>
Subject: Re: [B.A.T.M.A.N.] [PATCH] batman-adv: use CRC32C instead of CRC16 in TT code
Date: Wed, 17 Apr 2013 18:56:59 +0200 [thread overview]
Message-ID: <20130417165658.GF20819@ritirata.org> (raw)
In-Reply-To: <201304180055.41009.lindner_marek@yahoo.de>
[-- Attachment #1: Type: text/plain, Size: 1992 bytes --]
On Thu, Apr 18, 2013 at 12:55:40AM +0800, Marek Lindner wrote:
> On Wednesday, April 17, 2013 02:16:05 Antonio Quartulli wrote:
> > @@ -1376,13 +1376,11 @@ out:
> > static uint16_t batadv_tt_global_crc(struct batadv_priv *bat_priv,
> > struct batadv_orig_node *orig_node)
> > {
> > - uint16_t total = 0, total_one;
> > struct batadv_hashtable *hash = bat_priv->tt.global_hash;
> > struct batadv_tt_common_entry *tt_common;
> > struct batadv_tt_global_entry *tt_global;
> > struct hlist_head *head;
> > - uint32_t i;
> > - int j;
> > + uint32_t i, crc = 0;
> >
> > for (i = 0; i < hash->size; i++) {
> > head = &hash->table[i];
>
> How about making the function to "static uint32_t" ?
definitely ACK
>
>
> > /* Calculates the checksum of the local table */
> > static uint16_t batadv_tt_local_crc(struct batadv_priv *bat_priv)
> > {
> > - uint16_t total = 0, total_one;
> > struct batadv_hashtable *hash = bat_priv->tt.local_hash;
> > struct batadv_tt_common_entry *tt_common;
> > struct hlist_head *head;
> > - uint32_t i;
> > - int j;
> > + uint32_t i, crc = 0;
> >
> > for (i = 0; i < hash->size; i++) {
> > head = &hash->table[i];
>
> Same here.
>
definitely ACK²
>
> > @@ -1642,7 +1631,7 @@ out:
> >
> > static int batadv_send_tt_request(struct batadv_priv *bat_priv,
> > struct batadv_orig_node *dst_orig_node,
> > - uint8_t ttvn, uint16_t tt_crc,
> > + uint8_t ttvn, uint32_t tt_crc,
> > bool full_table)
> > {
>
> Kernel doc ? :)
>
cha cha cha, will do :)
Cheers,
> Cheers,
> Marek
--
Antonio Quartulli
..each of us alone is worth nothing..
Ernesto "Che" Guevara
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
prev parent reply other threads:[~2013-04-17 16:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-16 18:16 [B.A.T.M.A.N.] [PATCH] batman-adv: use CRC32C instead of CRC16 in TT code Antonio Quartulli
2013-04-17 16:55 ` Marek Lindner
2013-04-17 16:56 ` Antonio Quartulli [this message]
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=20130417165658.GF20819@ritirata.org \
--to=ordex@autistici.org \
--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