1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Follow-up work on integration

This commit is contained in:
Ondrej Zajicek (work)
2015-12-24 15:52:03 +01:00
parent 70b90dde23
commit 04632fd77f
20 changed files with 238 additions and 167 deletions

View File

@@ -195,10 +195,10 @@ rt_prune_sources(void)
* Multipath Next Hop
*/
static inline uint
static inline u32
mpnh_hash(struct mpnh *x)
{
uint h = 0;
u32 h = 0;
for (; x; x = x->next)
h ^= ipa_hash(x->gw);
@@ -1008,8 +1008,9 @@ rta_alloc_hash(void)
static inline uint
rta_hash(rta *a)
{
return (((uint) (uintptr_t) a->src) ^ ipa_hash(a->gw) ^
mpnh_hash(a->nexthops) ^ ea_hash(a->eattrs)) & 0xffff;
/* XXXX fully convert to u32 hashing */
return (((uint) (uintptr_t) a->src) ^ (ipa_hash(a->gw) >> 16) ^
(mpnh_hash(a->nexthops) >> 16) ^ ea_hash(a->eattrs)) & 0xffff;
}
static inline int