Re: [B.A.T.M.A.N.] [PATCH] batman-adv: use CRC32C instead of CRC16 in TT code

Antonio Quartulli
2013-04-17T16:56:59Z

[-- 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 --]