Re: [B.A.T.M.A.N.] [PATCH 1/3] batman-adv: Store and transmit own neighborhood hash

2016-10-06 Thread Linus Lüssing
On Thu, Sep 29, 2016 at 05:31:27PM +0200, Sven Eckelmann wrote: > On Dienstag, 20. September 2016 14:12:43 CEST Linus Lüssing wrote: > [...] > > /** > > + * batadv_hardif_neigh_get_pre - get the predecessor of a neighbor node > > + * @hard_iface: the interface this neighbour is connected to > > +

Re: [B.A.T.M.A.N.] [PATCH 1/3] batman-adv: Store and transmit own neighborhood hash

2016-10-05 Thread Linus Lüssing
On Thu, Oct 06, 2016 at 03:55:21AM +0200, Linus Lüssing wrote: > On Thu, Sep 29, 2016 at 05:31:27PM +0200, Sven Eckelmann wrote: > > First you have to use hlist_add_head_rcu and hlist_add_behind_rcu here > > because > > the readers use RCU to access the list. I think it would also be more > > appr

Re: [B.A.T.M.A.N.] [PATCH 1/3] batman-adv: Store and transmit own neighborhood hash

2016-10-05 Thread Linus Lüssing
On Thu, Sep 29, 2016 at 05:31:27PM +0200, Sven Eckelmann wrote: > First you have to use hlist_add_head_rcu and hlist_add_behind_rcu here because > the readers use RCU to access the list. I think it would also be more > appropriate to replace the rcu_read_lock in the batadv_hardif_neigh_get_pre > fu

Re: [B.A.T.M.A.N.] [PATCH 1/3] batman-adv: Store and transmit own neighborhood hash

2016-09-29 Thread Sven Eckelmann
On Dienstag, 20. September 2016 14:12:43 CEST Linus Lüssing wrote: [...] > diff --git a/net/batman-adv/bat_v.c b/net/batman-adv/bat_v.c > index e79f6f0..762b34c 100644 > --- a/net/batman-adv/bat_v.c > +++ b/net/batman-adv/bat_v.c [...] > + memset(bat_v->neigh_hash, 0, sizeof(bat_v->neigh_hash))

Re: [B.A.T.M.A.N.] [PATCH 1/3] batman-adv: Store and transmit own neighborhood hash

2016-09-29 Thread Sven Eckelmann
On Dienstag, 20. September 2016 14:12:43 CEST Linus Lüssing wrote: [...] > /** > + * batadv_v_elp_update_neigh_hash - updates neighborhood hash related data > + * @hard_iface: interface which the data has to be prepared for > + * > + * Firstly, this function updates the neighborhood hash of a hard

Re: [B.A.T.M.A.N.] [PATCH 1/3] batman-adv: Store and transmit own neighborhood hash

2016-09-29 Thread Sven Eckelmann
On Dienstag, 20. September 2016 14:12:43 CEST Linus Lüssing wrote: [...] > /** > + * batadv_hardif_neigh_get_pre - get the predecessor of a neighbor node > + * @hard_iface: the interface this neighbour is connected to > + * @neigh_addr: address of the neighbour to retrieve the predecessor for > +

Re: [B.A.T.M.A.N.] [PATCH 1/3] batman-adv: Store and transmit own neighborhood hash

2016-09-20 Thread Sven Eckelmann
[...] > diff --git a/net/batman-adv/Kconfig b/net/batman-adv/Kconfig > index f20742c..35e220e 100644 > --- a/net/batman-adv/Kconfig > +++ b/net/batman-adv/Kconfig > @@ -18,6 +18,7 @@ config BATMAN_ADV > config BATMAN_ADV_BATMAN_V > bool "B.A.T.M.A.N. V protocol (experimental)" > depend

[B.A.T.M.A.N.] [PATCH 1/3] batman-adv: Store and transmit own neighborhood hash

2016-09-20 Thread Linus Lüssing
Adds a sha512 hash as a TVLV to an ELP packet. Hash is the "sum" of all neighbors (ordered alphabetically, concatenated, binary) a node sees on a specific interface. Furthermore, the best and worst TX metric of all these neighbors on an interface are added to the TVLV. Signed-off-by: Linus Lüssin